Wrapped long line

This commit is contained in:
Colin Nicholson 2011-01-20 15:50:55 +00:00
parent 727a84d0dc
commit e76598fa58
1 changed files with 2 additions and 1 deletions

View File

@ -63,7 +63,8 @@ class DomainRemapMiddleware(object):
return resp(env, start_response)
if '_' not in account and '-' in account:
account = account.replace('-', '_', 1)
if account.lower().startswith(self.reseller_prefix.lower()) and not account.startswith(self.reseller_prefix):
if account.lower().startswith(self.reseller_prefix.lower()) and \
not account.startswith(self.reseller_prefix):
account_suffix = account[len(self.reseller_prefix):]
account = self.reseller_prefix + account_suffix
path = env['PATH_INFO'].strip('/')