diff options
author | Fedja Beader <fedja@protonmail.ch> | 2023-12-10 21:00:26 +0100 |
---|---|---|
committer | Fedja Beader <fedja@protonmail.ch> | 2023-12-10 21:00:26 +0100 |
commit | 715982bdf8b7c6bd6fb05221d82a0e1ab905336f (patch) | |
tree | 4e7adfdbe497908e2c19a7992816dd26f2edc751 /attoconf/lib/c.py | |
parent | 4e30c2ce14bb1cfbb0e3f87423db2c6f8d76f911 (diff) | |
download | attobuild-715982bdf8b7c6bd6fb05221d82a0e1ab905336f.tar.gz attobuild-715982bdf8b7c6bd6fb05221d82a0e1ab905336f.tar.bz2 attobuild-715982bdf8b7c6bd6fb05221d82a0e1ab905336f.tar.xz attobuild-715982bdf8b7c6bd6fb05221d82a0e1ab905336f.zip |
Upgrade to Python3.
Mostly using 2to3 automatic converter with some educated guesses on my
part. Produces same TMWA Makefile as py2 attoconf. YMMV.
Diffstat (limited to 'attoconf/lib/c.py')
-rw-r--r-- | attoconf/lib/c.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/attoconf/lib/c.py b/attoconf/lib/c.py index 03f77da..98d88df 100644 --- a/attoconf/lib/c.py +++ b/attoconf/lib/c.py @@ -15,7 +15,7 @@ # You should have received a copy of the GNU General Public License # along with attoconf. If not, see <http://www.gnu.org/licenses/>. -from __future__ import print_function, division, absolute_import + import errno import os @@ -44,7 +44,7 @@ class TempFile: def __init__(self, filename, content): self.filename = filename if content is not None: - with open(filename, 'wx') as of: + with open(filename, 'x') as of: of.write(content) else: # TODO: raise OSError(errno.EEXIST) if file already exists |