Bug 1196161 - libgfapi-python: Errno not populated properly by ctypes
Summary: libgfapi-python: Errno not populated properly by ctypes
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: libgfapi-python
Version: mainline
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: ---
Assignee: bugs@gluster.org
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-02-25 12:08 UTC by Prashanth Pai
Modified: 2015-11-16 06:19 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-11-16 06:19:51 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)
Expose Errno PR (21.89 KB, patch)
2015-08-30 05:28 UTC, Alphadelta14
no flags Details | Diff

Description Prashanth Pai 2015-02-25 12:08:35 UTC
Description of problem:

Steps to Reproduce:
[root@vm0 libgfapi-python]# python
Python 2.7.5 (default, Jun 25 2014, 10:19:55) 
[GCC 4.8.2 20131212 (Red Hat 4.8.2-7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from glusterfs import gfapi
>>> v = gfapi.Volume("vm0", "test")
>>> v.mount()
0
>>> v.stat('/a')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "glusterfs/gfapi.py", line 558, in stat
    raise OSError(err, os.strerror(err))
OSError: [Errno 0] Success
>>> 

Expected results:
Proper errno to be set. In the above example errno to be ENOENT.

Some additional info:

Comment 1 Alphadelta14 2015-08-30 05:28:06 UTC
Created attachment 1068383 [details]
Expose Errno PR

Patch to expose errno to foreign functions in gfapi in PR https://github.com/gluster/libgfapi-python/pull/7

Comment 2 Prashanth Pai 2015-11-16 06:19:51 UTC
This has been fixed by Alphadelta14 here: http://review.gluster.org/#/c/12051/


Note You need to log in before you can comment on or make changes to this bug.