[extensions-web] review: Shuffle some code around



commit f0ec30f8ae532fdabf30cb6cd779e82d342bc5c8
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Feb 6 15:47:56 2012 -0500

    review: Shuffle some code around
    
    Just a cosmetic change, nothing here

 sweettooth/review/views.py |   28 ++++++++++++++--------------
 1 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/sweettooth/review/views.py b/sweettooth/review/views.py
index e976b3d..e2de6d2 100644
--- a/sweettooth/review/views.py
+++ b/sweettooth/review/views.py
@@ -39,20 +39,6 @@ BINARY_TYPES = set(['.mo', '.png', ',jpg', '.jpeg', '.gif', '.bmp'])
 
 code_formatter = pygments.formatters.HtmlFormatter(style="borland", cssclass="code")
 
-def get_filelist(zipfile, disallow_binary):
-    for name in zipfile.namelist():
-        if name.endswith('/'):
-            # There's no directory flag in the info, so I'm
-            # guessing this is the most reliable way to do it.
-            continue
-
-        if disallow_binary:
-            base, extension = os.path.splitext(name)
-            if extension in BINARY_TYPES:
-                continue
-
-        yield name
-
 def can_review_extension(user, extension):
     if user == extension.creator:
         return True
@@ -119,6 +105,20 @@ def get_zipfiles(version, old_version_number=None):
 
     return old_zipfile, new_zipfile
 
+def get_filelist(zipfile, disallow_binary):
+    for name in zipfile.namelist():
+        if name.endswith('/'):
+            # There's no directory flag in the info, so I'm
+            # guessing this is the most reliable way to do it.
+            continue
+
+        if disallow_binary:
+            base, extension = os.path.splitext(name)
+            if extension in BINARY_TYPES:
+                continue
+
+        yield name
+
 def get_diff(old_zipfile, new_zipfile, filename):
     old, new = old_zipfile.open(filename, 'r'), new_zipfile.open(filename, 'r')
     oldcontent, newcontent = old.read(), new.read()



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]