Show More
@@ -31,7 +31,6 b' import binascii' | |||||
31 | import datetime |
|
31 | import datetime | |
32 | import json |
|
32 | import json | |
33 | import os |
|
33 | import os | |
34 | import pwd |
|
|||
35 | import re |
|
34 | import re | |
36 | import time |
|
35 | import time | |
37 | import urllib.parse |
|
36 | import urllib.parse | |
@@ -45,6 +44,12 b' from kallithea.lib.vcs.utils import asci' | |||||
45 | from kallithea.lib.vcs.utils.lazy import LazyProperty |
|
44 | from kallithea.lib.vcs.utils.lazy import LazyProperty | |
46 |
|
45 | |||
47 |
|
46 | |||
|
47 | try: | |||
|
48 | import pwd | |||
|
49 | except ImportError: | |||
|
50 | pass | |||
|
51 | ||||
|
52 | ||||
48 | # mute pyflakes "imported but unused" |
|
53 | # mute pyflakes "imported but unused" | |
49 | assert ascii_bytes |
|
54 | assert ascii_bytes | |
50 | assert ascii_str |
|
55 | assert ascii_str | |
@@ -331,7 +336,7 b' def get_clone_url(clone_uri_tmpl, prefix' | |||||
331 | prefix = urllib.parse.unquote(parsed_url.path.rstrip('/')) |
|
336 | prefix = urllib.parse.unquote(parsed_url.path.rstrip('/')) | |
332 | try: |
|
337 | try: | |
333 | system_user = pwd.getpwuid(os.getuid()).pw_name |
|
338 | system_user = pwd.getpwuid(os.getuid()).pw_name | |
334 |
except |
|
339 | except NameError: # TODO: support all systems - especially Windows | |
335 | system_user = 'kallithea' # hardcoded default value ... |
|
340 | system_user = 'kallithea' # hardcoded default value ... | |
336 | args = { |
|
341 | args = { | |
337 | 'scheme': parsed_url.scheme, |
|
342 | 'scheme': parsed_url.scheme, |
General Comments 0
You need to be logged in to leave comments.
Login now