Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
Printrun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
machinery
Printrun
Commits
ae81b883
Commit
ae81b883
authored
Jul 27, 2011
by
Keegi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Python 2.5 friendly exception catching syntax change
parent
9e11e5ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
pronsole.py
pronsole.py
+2
-2
No files found.
pronsole.py
View file @
ae81b883
...
...
@@ -260,7 +260,7 @@ class pronsole(cmd.Cmd):
self
.
save_in_rc
(
"set "
+
var
,
"set
%
s
%
s"
%
(
var
,
value
))
except
AttributeError
:
print
"Unknown variable '
%
s'"
%
var
except
ValueError
as
ve
:
except
ValueError
,
ve
:
print
"Bad value for variable '
%
s', expecting
%
s (
%
s)"
%
(
var
,
repr
(
t
)[
1
:
-
1
],
ve
.
args
[
0
])
def
do_set
(
self
,
argl
):
...
...
@@ -364,7 +364,7 @@ class pronsole(cmd.Cmd):
rco
.
close
()
os
.
rename
(
rco
.
name
,
self
.
rc_filename
)
print
"Saved '"
+
key
+
"' to '"
+
self
.
rc_filename
+
"'"
except
Exception
as
e
:
except
Exception
,
e
:
print
"Saving failed for"
,
key
+
":"
,
str
(
e
)
finally
:
del
rci
,
rco
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment