def prepareFailedName(release):
 fixed = urllib.unquote(release)
 if fixed.endswith('.nzb'):
  fixed = fixed.rpartition('.')[0]
 fixed = re.sub('[\\.\\-\\+\\ ]', '_', fixed)
 fixed = ss(fixed)
 return fixed

def prepareFailedName ( release ) : fixed = urllib . unquote ( release ) if fixed . endswith ( '.nzb' ) : fixed = fixed . rpartition ( '.' ) [ 0 ] fixed = re . sub ( '[\\.\\-\\+\\ ]' , '_' , fixed ) fixed = ss ( fixed ) return fixed
standardizes release name for failed db .