Ignore:
Timestamp:
Oct 11, 2016 9:23:41 PM (8 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
a69a967
Parents:
26c8be3
git-author:
Piotr Rozyczko <rozyczko@…> (10/11/16 21:23:03)
git-committer:
Piotr Rozyczko <rozyczko@…> (10/11/16 21:23:41)
Message:

filter out empty filenames. Fixes the obvious part of #770

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/calculator/model_editor.py

    r26c8be3 rad1ac45  
    946946        # Sort out the errors if occur 
    947947        # First check for valid python name then if the name already exists 
    948         if not re.match('^[A-Za-z0-9_]*$', name): 
    949             msg = "not a valid python name. Name must include only alpha \n" 
    950             msg += "numeric or underline characters and no spaces" 
     948        if not name or not bool(re.match('^[A-Za-z0-9_]*$', name)): 
     949            msg = "is not a valid python name. Name must not be empty and \n" 
     950            msg += "may include only alpha numeric or underline characters \n" 
     951            msg += "and no spaces" 
    951952        elif self.check_name(): 
    952953            description = self.desc_tcl.GetValue() 
Note: See TracChangeset for help on using the changeset viewer.