Changeset 3288

Show
Ignore:
Timestamp:
12/16/09 15:47:14 (10 years ago)
Author:
cemeyer
Message:

#795: Fix emulfile.assert_is_allowed_filename to check for the empty string.

Location:
seattle/trunk/repy
Files:
1 added
1 modified

Legend:

Unmodified
Added
Removed
  • seattle/trunk/repy/emulfile.py

    r2549 r3288  
    180180  if type(filename) != str: 
    181181    raise TypeError, "filename is not a string!" 
     182 
     183  # Make sure the filename isn't the empty string -- it doesn't make 
     184  # sense to allow this as a filename. 
     185  if "" == filename: 
     186    raise TypeError, "filename is the empty string!" 
    182187 
    183188  # among other things, this avoids them putting / or \ in the filename