Skip to content

Commit

Permalink
Removes client_utils_required decorator
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanphix committed Sep 19, 2012
1 parent 72b4948 commit deaab81
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions ghost/ghost.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,19 +124,6 @@ def wrapper(self, *args, **kwargs):
return wrapper


def client_utils_required(func):
"""Decorator that checks avabality of Ghost client side utils,
injects require javascript file instead.
"""
@wraps(func)
def wrapper(self, *args, **kwargs):
if not self.global_exists('GhostUtils'):
self.evaluate_js_file(
os.path.join(os.path.dirname(__file__), 'utils.js'))
return func(self, *args, **kwargs)
return wrapper


class HttpResource(object):
"""Represents an HTTP resource.
"""
Expand Down Expand Up @@ -449,7 +436,6 @@ def __enter__(self):
def __exit__(self, type, value, traceback):
Ghost._prompt_expected = None

@client_utils_required
def region_for_selector(self, selector):
"""Returns frame region for given selector as tupple.
Expand All @@ -462,7 +448,6 @@ def region_for_selector(self, selector):
raise Exception("can't get region for selector '%s'" % selector)
return region

@client_utils_required
@can_load_page
def set_field_value(self, selector, value, blur=True):
"""Sets the value of the field matched by given selector.
Expand Down

0 comments on commit deaab81

Please sign in to comment.