gladex team mailing list archive
-
gladex team
-
Mailing list archive
-
Message #00065
[Bug 316691] Re: Wrong path is passed to internal methods
I do not think the proposed fix does not address the problem.
The underlying issue is that __file__ when split has an empty path.
This can occur if the application is run from the command line locally.
I think the correct fix is to replace ALL occurrences of
os.path.split(__file__) with os.path.split( os.path.abspath( __file__ )
)
This method always returns a valid path and leafname and avoid
replicating checking code every time the path is needed.
I'd suggest setting a global ( to hold that path result ) during
initialisation. This would avoid making multiple calls to two functions
that are going to return what will be a constant during runtime.
Please note this issue ALSO occurs in generated code. Generated code
should also use this approach ( because we don't know that the resulting
code is not going to be executed locally from a command line ).
--
Wrong path is passed to internal methods
https://bugs.launchpad.net/bugs/316691
You received this bug notification because you are a member of Gladex
Developers, which is subscribed to Gladex.
References