mirror of
https://github.com/encounter/phantomjs.git
synced 2026-03-30 11:35:11 -07:00
Use phantom.scriptName instead of phantom.args[0]
This commit is contained in:
@@ -130,6 +130,10 @@ class Phantom(QObject):
|
||||
def scriptLookupDir(self, dirPath):
|
||||
self.m_page.scriptLookupDir = dirPath
|
||||
|
||||
@pyqtProperty(str)
|
||||
def scriptName(self):
|
||||
return os.path.basename(self.m_scriptFile)
|
||||
|
||||
@pyqtProperty('QVariantMap')
|
||||
def version(self):
|
||||
version = {
|
||||
|
||||
@@ -77,8 +77,6 @@ def parseArgs(args):
|
||||
if not os.path.exists(args.script):
|
||||
sys.exit('No such file or directory: \'%s\'' % args.script)
|
||||
|
||||
args.script_args.insert(0, os.path.basename(args.script))
|
||||
|
||||
return args
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user