Skip to content

Commit 2ffddd0

Browse files
committed
[GR-13918] option -c doesn't work as expected.
PullRequest: graalpython/408
2 parents cadb7a4 + ae8521c commit 2ffddd0

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

graalpython/com.oracle.graal.python.shell/src/com/oracle/graal/python/shell/GraalPythonMain.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ protected List<String> preprocessArguments(List<String> givenArgs, Map<String, S
9393
break;
9494
case "-c":
9595
i += 1;
96+
programArgs.add(arg);
9697
if (i < arguments.size()) {
9798
commandString = arguments.get(i);
9899
} else {
@@ -182,6 +183,10 @@ protected List<String> preprocessArguments(List<String> givenArgs, Map<String, S
182183
subprocessArgs.add("Dgraal.TruffleCompilationExceptionsAreThrown=true");
183184
inputArgs.remove("-compile-truffle-immediately");
184185
break;
186+
case "-u":
187+
// TODO we currently don't support this option, but needs to be consumed
188+
// due pip/wheel installer.
189+
break;
185190
default:
186191
if (!arg.startsWith("-")) {
187192
inputFile = arg;

graalpython/lib-graalpython/exceptions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def OSError__new__(subtype, *args, **kwds):
165165
def OSError__init__(self, *args, **kwds):
166166
if (not _oserror_use_init(type(self))):
167167
return None
168-
_oserror_init(self, *arg)
168+
_oserror_init(self, *args)
169169

170170
def OSError__str__(self):
171171
if (self.filename):
@@ -175,7 +175,7 @@ def OSError__str__(self):
175175
return "[Errno %i] %s: %s" % (self.errno, self.strerror, self.filename)
176176
if(self.errno and self.strerror):
177177
return "[Errno %i] %s" % (self.errno, self.strerror)
178-
return BaseException.str(self)
178+
return BaseException.__str__(self)
179179

180180
OSError.__new__ = OSError__new__
181181
OSError.__init__ = OSError__init__

0 commit comments

Comments
 (0)