Changeset - eca0cb56a822
[Not reviewed]
stable
0 1 0
Mads Kiilerich (mads) - 6 years ago 2020-07-26 00:03:12
mads@kiilerich.com
Grafted from: c619e7bf117a
py3: fix rc_types error

Spotted by pytypes:

File "kallithea/bin/base.py", line 133, in make_config: Function BinaryIO.write was called with the wrong arguments [wrong-arg-types]
Expected: (self, s: Union[bytearray, bytes, memoryview])
Actually passed: (self, s: str)
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
kallithea/bin/base.py
Show inline comments
 
@@ -127,13 +127,13 @@ class RcConf(object):
 
        """
 
        update = False
 
        if os.path.exists(self._conf_name):
 
            update = True
 
        with open(self._conf_name, 'wb') as f:
 
            ext_json.dump(config, f, indent=4)
 
            f.write('\n')
 
            f.write(b'\n')
 

	
 
        if update:
 
            sys.stdout.write('Updated config in %s\n' % self._conf_name)
 
        else:
 
            sys.stdout.write('Created new config in %s\n' % self._conf_name)
 

	
0 comments (0 inline, 0 general)