Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
glpatcern committed Oct 6, 2022
1 parent c7990c3 commit 7e972ca
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/bridge/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def appsave(docid):
WB.log.error('msg="BridgeSave: missing metadata" address="%s" headers="%s" args="%s" error="%s"' %
(flask.request.remote_addr, flask.request.headers, flask.request.args, e))
return wopic.jsonify('Missing metadata, could not save. %s' % RECOVER_MSG), http.client.BAD_REQUEST
except ValueError as e:
except ValueError:
WB.log.error('msg="BridgeSave: unknown application" address="%s" appheader="%s" args="%s"' %
(flask.request.remote_addr, flask.request.headers.get(BRIDGED_APP_HEADER), flask.request.args))
# temporary override
Expand Down
5 changes: 2 additions & 3 deletions src/bridge/codimd.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ def getredirecturl(viewmode, wopisrc, acctok, docid, filename, displayname):
return f'{appexturl}/{docid}?{mode}&{urlparse.urlencode(params)}'

# read-only mode: first check if we have a CodiMD redirection
res = requests.head(appurl + '/' + docid,
verify=sslverify)
res = requests.head(appurl + '/' + docid, verify=sslverify)
if res.status_code == http.client.FOUND:
return '%s/s/%s' % (appexturl, urlparse.urlsplit(res.next.url).path.split('/')[-1])
# we used to redirect to publish mode or normal view to quickly jump in slide mode depending on the content,
Expand Down Expand Up @@ -115,7 +114,7 @@ def _unzipattachments(inputbuf):
return mddoc


#def _isslides(doc):
# def _isslides(doc):
# '''Heuristically look for signatures of slides in the header of a md document'''
# return doc[:9].decode() == '---\ntitle' or doc[:8].decode() == '---\ntype' or doc[:16].decode() == '---\nslideOptions'

Expand Down
1 change: 0 additions & 1 deletion src/core/commoniface.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,3 @@ def validatelock(filepath, appname, oldlock, oldvalue, op, log):
log.warning('msg="Failed to %s" filepath="%s" appname="%s" reason="%s"' %
(op, filepath, appname, e))
raise

1 change: 1 addition & 0 deletions src/core/xrootiface.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
homepath = None
timeout = None


def init(inconfig, inlog):
'''Init module-level variables'''
global config # pylint: disable=global-statement
Expand Down

0 comments on commit 7e972ca

Please sign in to comment.