Commit b6c8c0a6b8f2bc4a78225a8c583fd646ef5bbaad
1 parent
7560608f
Exists in
master
and in
1 other branch
Fixed bug whit blank lines in uploaded file.
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
src/user.py
... | ... | @@ -316,13 +316,13 @@ class PkgsListSystem(User): |
316 | 316 | elif type(pkgs_list_or_file).__name__ == "str": |
317 | 317 | try: |
318 | 318 | with open(pkgs_list_or_file) as pkgs_list_file: |
319 | - pkgs_list = [line.split()[0] for line in pkgs_list_file] | |
319 | + pkgs_list = [line.split()[0] for line in pkgs_list_file if line.split()] | |
320 | 320 | except IOError: |
321 | 321 | logging.critical("Could not open packages list file.") |
322 | 322 | raise Error |
323 | 323 | else: |
324 | 324 | logging.debug("No packages provided for user profiling.") |
325 | - return self.pkg_profile | |
325 | + pkgs_list = [] | |
326 | 326 | |
327 | 327 | User.__init__(self,dict.fromkeys(pkgs_list,1),user_id) |
328 | 328 | ... | ... |