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

[tor-commits] [stem/master] Fixing pyflakes issues



commit cc1a6168815f66809a4284b7d2958b13059acdbd
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Sat Aug 16 17:20:54 2014 -0700

    Fixing pyflakes issues
    
    Couple finds from the new version of pyflakes...
    
      * /home/atagar/Desktop/stem/stem/descriptor/server_descriptor.py
        line 543  - list comprehension redefines 'value' from line 374
    
      * /home/atagar/Desktop/stem/stem/util/test_tools.py
        line 175  - local variable 'prev_indent' is assigned to but never used
---
 stem/descriptor/server_descriptor.py |    2 +-
 stem/util/test_tools.py              |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/stem/descriptor/server_descriptor.py b/stem/descriptor/server_descriptor.py
index 6599e0a..c1fed66 100644
--- a/stem/descriptor/server_descriptor.py
+++ b/stem/descriptor/server_descriptor.py
@@ -540,7 +540,7 @@ class ServerDescriptor(Descriptor):
       elif keyword == 'ipv6-policy':
         self.exit_policy_v6 = stem.exit_policy.MicroExitPolicy(value)
       elif keyword == 'or-address':
-        or_address_entries = [value for (value, _, _) in values]
+        or_address_entries = [address_entry for (address_entry, _, _) in values]
 
         for entry in or_address_entries:
           line = '%s %s' % (keyword, entry)
diff --git a/stem/util/test_tools.py b/stem/util/test_tools.py
index c976128..ba6392d 100644
--- a/stem/util/test_tools.py
+++ b/stem/util/test_tools.py
@@ -172,7 +172,7 @@ def get_stylistic_issues(paths, check_two_space_indents = False, check_newlines
       with open(path) as f:
         file_contents = f.read()
 
-      lines, prev_indent = file_contents.split('\n'), 0
+      lines = file_contents.split('\n')
       is_block_comment = False
 
       for index, line in enumerate(lines):



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits