Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
Simplify check for sptfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
chadwhitacre committed Jul 28, 2016
1 parent cecb6ce commit 5592272
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gratipay/models/participant/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1137,8 +1137,8 @@ def change_username(self, suggested):

# Don't allow any username which is the name of a
# file existing on the web_root folder.
for ext in ['', '.spt', '.ico', '.txt', '.osdd']:
if (lowercased + ext) in gratipay.RESTRICTED_USERNAMES:
for name in (lowercased, lowercased + '.spt'):
if name in gratipay.RESTRICTED_USERNAMES:
raise UsernameIsRestricted(suggested)

if suggested != self.username:
Expand Down

0 comments on commit 5592272

Please sign in to comment.