src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/Security/SecurityUtils.py

branch
eric7
changeset 10372
1444b4bee64b
parent 10169
0f70a4ef4592
child 10439
21c28b0f9e41
equal deleted inserted replaced
10371:1f54843e8152 10372:1444b4bee64b
43 @exception InvalidModulePathError raised to indicate an invalid module path 43 @exception InvalidModulePathError raised to indicate an invalid module path
44 """ 44 """
45 (head, tail) = os.path.split(path) 45 (head, tail) = os.path.split(path)
46 if head == "" or tail == "": 46 if head == "" or tail == "":
47 raise InvalidModulePathError( 47 raise InvalidModulePathError(
48 'Invalid python file path: "{0}"' " Missing path or file name".format(path) 48 'Invalid python file path: "{0}" Missing path or file name'.format(path)
49 ) 49 )
50 50
51 qname = [os.path.splitext(tail)[0]] 51 qname = [os.path.splitext(tail)[0]]
52 while head not in ["/", ".", ""]: 52 while head not in ["/", ".", ""]:
53 if os.path.isfile(os.path.join(head, "__init__.py")): 53 if os.path.isfile(os.path.join(head, "__init__.py")):

eric ide

mercurial