Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Unified Diff: tools/chrome_remote_control/chrome_remote_control/page_set.py

Issue 10984018: [chrome_remote_control] Add pylint to PRESUMMIT and fix lint (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: for landing Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tools/chrome_remote_control/chrome_remote_control/page_set.py
diff --git a/tools/chrome_remote_control/chrome_remote_control/page_set.py b/tools/chrome_remote_control/chrome_remote_control/page_set.py
index 3e1981c6c95e9ae6e49d07cc5e262f38d4412307..acf7039c2e70ee33f98f0bad895d4e0d9b0748ac 100644
--- a/tools/chrome_remote_control/chrome_remote_control/page_set.py
+++ b/tools/chrome_remote_control/chrome_remote_control/page_set.py
@@ -5,18 +5,19 @@ import json
import urlparse
class Page(object):
- def __init__(self, url, attributes={}):
+ def __init__(self, url, attributes=None):
self.url = url
parsed_url = urlparse.urlparse(url)
- if parsed_url.scheme == None:
+ if parsed_url.scheme == None: # pylint: disable=E1101
raise Exception('urls must be fully qualified: %s' % url)
self.interactions = 'scroll'
self.credentials = None
self.wait_time_after_navigate = 2
self.scroll_is_infinite = False
- for k, v in attributes.iteritems():
- setattr(self, k, v)
+ if attributes:
+ for k, v in attributes.iteritems():
+ setattr(self, k, v)
def __str__(self):
return self.url

Powered by Google App Engine
This is Rietveld 408576698