protonscr

driverhelper.py: non-existent method file() used instead of open()

steamclosed reviewed
ValveSoftware/steam-for-linux#186 · opened 2012-12-21 by JLimperg · updated 2014-05-02 · 3 comments · github
JJLimperg 2012-12-21 github

In line 276, driverhelper.py uses the method file() instead of open(). This produces the following error:

Traceback (most recent call last):
  File "/home/jannis/.local/share/Steam/ubuntu12_32/driverhelper.py", line 431, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/home/jannis/.local/share/Steam/ubuntu12_32/driverhelper.py", line 368, in main
    pkgInfo.init((args[1], args[2], args[3]))
  File "/home/jannis/.local/share/Steam/ubuntu12_32/driverhelper.py", line 276, in init
    f = file(self.cache_file, 'w')
NameError: global name 'file' is not defined

In order to fix this issue, the following patch can be applied:

276c276
<       f = file(self.cache_file, 'w')

---
>       f = open(self.cache_file, 'w')
Sscottlu 2012-12-21 github

This is fixed and will be in the next release. Thanks.

JJLimperg 2012-12-21 github

Great! I must say, I am quite impressed by the response times on this tracker. Would you mind me closing this issue then?

Sscottlu 2012-12-22 github

Yes, please do, thanks. The next Steam update will be after the holidays.

Nothing extracted yet.