Skip to content

Commit

Permalink
Fixed case of use before assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
glpatcern committed Jun 16, 2022
1 parent 9fffb1d commit 3da631b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/wopiutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,9 @@ def generateAccessToken(userid, fileid, viewmode, user, folderurl, endpoint, app
log.info('msg="Requested file not found or not a file" fileid="%s" error="%s"' % (fileid, e))
raise
exptime = int(time.time()) + srv.tokenvalidity
fext = os.path.splitext(statinfo['filepath'])[1].lower()
if not appediturl:
# deprecated: for backwards compatibility, work out the URLs from the discovered app endpoints
fext = os.path.splitext(statinfo['filepath'])[1].lower()
try:
appediturl = endpoints[fext]['edit']
appviewurl = endpoints[fext]['view']
Expand Down

0 comments on commit 3da631b

Please sign in to comment.