Andrew Bogott has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/61891


Change subject: Pep8 cleanup
......................................................................

Pep8 cleanup

Change-Id: I51837d8a00bfdb9a77add0c1ac810e93856a40ac
---
M files/swift/swiftcleaner/swiftcleaner_helper.py
1 file changed, 14 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/91/61891/1

diff --git a/files/swift/swiftcleaner/swiftcleaner_helper.py 
b/files/swift/swiftcleaner/swiftcleaner_helper.py
index eb0ee05..47e4a99 100644
--- a/files/swift/swiftcleaner/swiftcleaner_helper.py
+++ b/files/swift/swiftcleaner/swiftcleaner_helper.py
@@ -3,7 +3,10 @@
 ##
 
 import urllib2
-# make a class to hold the swift authentication token and fetch a new one when 
necessary.
+
+
+# make a class to hold the swift authentication token
+# and fetch a new one when necessary.
 class Token():
     _token = 'AUTH_abc123'
     _user = 'account:user'
@@ -17,7 +20,8 @@
             cls._key = conf['key']
             cls._useragent = conf['useragent']
         except KeyError:
-            # if the cnofiguration doesn't have the one we want, juts ignore 
all of them.
+            # if the cnofiguration doesn't have the one we want,
+            # just ignore all of them.
             pass
 
     @classmethod
@@ -27,12 +31,14 @@
             #print "  old token; returning token %s" % cls._token
             return cls._token
         # otherwise get a new token from Swift
-        # eg curl -k -v -H 'X-Auth-User: mw:thumb' -H 'X-Auth-Key: 
xxxxxxxxxxxx' http://ms-fe.pmtpa.wmnet/auth/v1.0
+        # eg curl -k -v -H 'X-Auth-User: mw:thumb' -H
+        # 'X-Auth-Key: xxxxxxxxxxxx' http://ms-fe.pmtpa.wmnet/auth/v1.0
         headers = {}
         headers['X-Auth-User'] = cls._user
         headers['X-Auth-Key'] = cls._key
         headers['User-Agent'] = cls._useragent
-        req = urllib2.Request('http://ms-fe.pmtpa.wmnet/auth/v1.0', 
headers=headers)
+        req = urllib2.Request('http://ms-fe.pmtpa.wmnet/auth/v1.0',
+                              headers=headers)
         try:
             resp = urllib2.urlopen(req)
         except urllib2.HTTPError, e:
@@ -48,6 +54,7 @@
         # force the next request for a token to get a fresh one
         cls._token = None
 
+
 def read_config(conffile, conf):
     # which configs are what type?
     intconfs = ['numthreads', 'objsperthread']
@@ -61,7 +68,7 @@
                 # throw away the part after the comment character
                 (line, comment) = line.split("#", 1)
             try:
-                (opt,val) = line.split("=")
+                (opt, val) = line.split("=")
             except ValueError:
                 # no = sign in the line, skip this line
                 continue
@@ -73,7 +80,8 @@
             if opt in floatconfs:
                 val = float(val)
             if opt in boolconfs:
-                # if it's set to anything but 'False', go ahead and enter 
testing mode.  safer that way.
+                # if it's set to anything but 'False', go ahead and enter i
+                # testing mode.  safer that way.
                 val = (False if val == False or val == 'False' else True)
             conf[opt] = val
         configfh.close()

-- 
To view, visit https://gerrit.wikimedia.org/r/61891
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I51837d8a00bfdb9a77add0c1ac810e93856a40ac
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to