vdeku / xbmc-adult

Automatically exported from code.google.com/p/xbmc-adult
0 stars 0 forks source link

Fix for XBMC log warning regarded deprecated function in fantasti.cc plugin. #71

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In order to get rid of the warning:

DeprecationWarning: os.getcwd() currently lies to you so please use 
addon.getAddonInfo('path') to find the script's root directory and DO NOT make 
relative path accesses based on the results of 'os.getcwd.'

In default.py change this:

       __addonpath__ = os.getcwd()

to this:

       __addonpath__ = xbmcaddon.Addon(id=__addonname__).getAddonInfo('path')

In resources/lib/weblogin.py change this:

       logged_in = doLogin(os.getcwd(),myusername,mypassword)

to this:

       logged_in = doLogin(xbmcaddon.Addon(id=__addonname__).getAddonInfo('path'),myusername,mypassword)

Original issue reported on code.google.com by leonmar...@gmail.com on 12 Aug 2013 at 2:53

GoogleCodeExporter commented 9 years ago
not changing weblogin.py, that line is there so that the script can be run from 
the command line, if you change it to xbmcaddon... it is then not possible to 
do so

Original comment by mrdougqu...@gmail.com on 13 Aug 2013 at 11:16

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r259.

Original comment by mrdougqu...@gmail.com on 13 Aug 2013 at 11:17