Discussion:
[Pyublas] Error of ./configure.py --update-user
전경원
2012-04-04 07:06:55 UTC
Permalink
Hi.

The --update-user option of configure.py causes the following error. I
tried the 2011.1 version on Ubuntu 11.10(Python 2.7.2+).

PyUblas-2011.1_orig$ ./configure.py --update-user
Traceback (most recent call last):
File "./configure.py", line 4, in <module>
configure_frontend()
File "/home/kwchun/Software/PyUblas-2011.1_orig/aksetup_helper.py", line
635, in configure_frontend
schema.update_user_config(config)
File "/home/kwchun/Software/PyUblas-2011.1_orig/aksetup_helper.py", line
320, in update_user_config
self.update_conf_file(self.user_conf_file, config)
File "/home/kwchun/Software/PyUblas-2011.1_orig/aksetup_helper.py", line
303, in update_conf_file
del filevars["__builtins__"]
KeyError: '__builtins__'
PyUblas-2011.1_orig$

It may need to check the key in filevars before delete it.

$ cat aksetup_helper.py.diff
--- ./PyUblas-2011.1_orig/aksetup_helper.py 2010-10-19
12:21:19.000000000 +0900
+++ ./PyUblas-2011.1/aksetup_helper.py 2012-04-04 15:43:13.664356676
+0900
@@ -300,7 +300,8 @@
except IOError:
pass

- del filevars["__builtins__"]
+ if filevars.has_key("__builtins__"):
+ del filevars["__builtins__"]

for key, value in config.items():
if value is not None:

Cheers.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.tiker.net/pipermail/pyublas/attachments/20120404/76822fa2/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: aksetup_helper.py.diff
Type: application/octet-stream
Size: 426 bytes
Desc: not available
URL: <http://lists.tiker.net/pipermail/pyublas/attachments/20120404/76822fa2/attachment.obj>
Andreas Kloeckner
2012-04-13 04:34:48 UTC
Permalink
Post by 전경원
Hi.
The --update-user option of configure.py causes the following error. I
tried the 2011.1 version on Ubuntu 11.10(Python 2.7.2+).
PyUblas-2011.1_orig$ ./configure.py --update-user
File "./configure.py", line 4, in <module>
configure_frontend()
File "/home/kwchun/Software/PyUblas-2011.1_orig/aksetup_helper.py", line
635, in configure_frontend
schema.update_user_config(config)
File "/home/kwchun/Software/PyUblas-2011.1_orig/aksetup_helper.py", line
320, in update_user_config
self.update_conf_file(self.user_conf_file, config)
File "/home/kwchun/Software/PyUblas-2011.1_orig/aksetup_helper.py", line
303, in update_conf_file
del filevars["__builtins__"]
KeyError: '__builtins__'
PyUblas-2011.1_orig$
It may need to check the key in filevars before delete it.
$ cat aksetup_helper.py.diff
--- ./PyUblas-2011.1_orig/aksetup_helper.py 2010-10-19
12:21:19.000000000 +0900
+++ ./PyUblas-2011.1/aksetup_helper.py 2012-04-04 15:43:13.664356676
+0900
@@ -300,7 +300,8 @@
pass
- del filevars["__builtins__"]
+ del filevars["__builtins__"]
Thanks for the patch, I've merged it. While I can't reproduce your
issue, your patch should be generally harmless, so I don't see any
potential harm from accepting it.

Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.tiker.net/pipermail/pyublas/attachments/20120413/fd8650f2/attachment.pgp>
Loading...