Skip to content

Commit

Permalink
Merge pull request #1237 from pnijhara/pnijhara-patch-1
Browse files Browse the repository at this point in the history
Fix some bug-risk and code quality issues
  • Loading branch information
Eugeny committed Apr 22, 2020
2 parents 397b4cb + cf79317 commit b03b0c4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .deepsource.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version = 1

[[analyzers]]
name = "python"
enabled = true

[analyzers.meta]
runtime_version = "3.x.x"
4 changes: 3 additions & 1 deletion ajenti/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ class HttpRoot (object):
A root middleware object that creates the :class:`HttpContext` and dispatches it to other registered middleware
"""

def __init__(self, stack=[]):
def __init__(self, stack=None):
if stack is None:
stack = []
self.stack = stack

def add(self, middleware):
Expand Down
2 changes: 1 addition & 1 deletion ajenti/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def make_report(e):
version,
platform, platform_unmapped, platform_string.strip(),
subprocess.check_output(['uname', '-mp']).strip(),
'.'.join([str(x) for x in _platform.python_version_tuple()]),
'.'.join(str(x) for x in _platform.python_version_tuple()),
installation_uid,
debug,
catcher_url or 'Failed to upload traceback',
Expand Down

0 comments on commit b03b0c4

Please sign in to comment.