[Pkg-privacy-commits] [onionshare] 251/256: Removing '\n' arg negates the need for `wordlist.remove()`, renamed unused variable 'x' to '_'

Ulrike Uhlig ulrike at moszumanska.debian.org
Fri May 26 12:53:52 UTC 2017


This is an automated email from the git hooks/post-receive script.

ulrike pushed a commit to branch master
in repository onionshare.

commit bf7735821ce742230cd892c87826ba0a545eceed
Author: Delirious Lettuce <delirious.lettuce at gmail.com>
Date:   Wed May 24 13:22:41 2017 -0600

    Removing '\n' arg negates the need for `wordlist.remove()`, renamed unused variable 'x' to '_'
---
 onionshare/common.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/onionshare/common.py b/onionshare/common.py
index cff2224..508acd3 100644
--- a/onionshare/common.py
+++ b/onionshare/common.py
@@ -136,11 +136,10 @@ def build_slug():
     Returns a random string made from two words from the wordlist, such as "deter-trig".
     """
     with open(get_resource_path('wordlist.txt')) as f:
-        wordlist = f.read().split('\n')
-        wordlist.remove('')
+        wordlist = f.read().split()
 
     r = SystemRandom()
-    return '-'.join(r.choice(wordlist) for x in range(2))
+    return '-'.join(r.choice(wordlist) for _ in range(2))
 
 
 def human_readable_filesize(b):

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/onionshare.git



More information about the Pkg-privacy-commits mailing list