Hi list,
I'm happy to join to this nice mail list. At my company we use python to handle system administration tasks.
I found the next problem during my work:

test.py:
# cat test.py
#!/usr/bin/python

import os
os.statvfs('/')

result:
# python -m trace -t test.py
 --- modulename: threading, funcname: settrace
threading.py(90):     _trace_hook = func
 --- modulename: trace, funcname: <module>
<string>(1):   --- modulename: trace, funcname: <module>
test.py(3): import os
test.py(6): os.statvfs('/')
Traceback (most recent call last):
  File "/usr/lib64/python2.6/runpy.py", line 122, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib64/python2.6/runpy.py", line 34, in _run_code
    exec code in run_globals
  File "/mnt/sysimg/usr/lib64/python2.6/trace.py", line 813, in <module>
    main()
  File "/mnt/sysimg/usr/lib64/python2.6/trace.py", line 801, in main
    t.run('execfile(%r)' % (progname,))
  File "/mnt/sysimg/usr/lib64/python2.6/trace.py", line 498, in run
    exec cmd in dict, dict
  File "<string>", line 1, in <module>
  File "test.py", line 6, in <module>
    os.statvfs('/')
OSError: [Errno 0] Error: '/'

# python --version
Python 2.6.2

# arch
mips64

os.stat works fine.

I would be very happy with any kind of help. I don't have any idea why this one fails.
Thanks in advance.
Br,
    Peter.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to