equal
deleted
inserted
replaced
110 self._find_cfg_file() |
110 self._find_cfg_file() |
111 fstat = os.stat(self._cfg_fname) |
111 fstat = os.stat(self._cfg_fname) |
112 fmode = int(oct(fstat.st_mode & 0777)) |
112 fmode = int(oct(fstat.st_mode & 0777)) |
113 if fmode % 100 and fstat.st_uid != fstat.st_gid or \ |
113 if fmode % 100 and fstat.st_uid != fstat.st_gid or \ |
114 fmode % 10 and fstat.st_uid == fstat.st_gid: |
114 fmode % 10 and fstat.st_uid == fstat.st_gid: |
|
115 # TP: Please keep the backticks around the command. `chmod 0600 …` |
115 raise PermissionError(_(u"wrong permissions for '%(file)s': " |
116 raise PermissionError(_(u"wrong permissions for '%(file)s': " |
116 u"%(perms)s\n`chmod 0600 %(file)s` would " |
117 u"%(perms)s\n`chmod 0600 %(file)s` would " |
117 u"be great.") % {'file': self._cfg_fname, |
118 u"be great.") % {'file': self._cfg_fname, |
118 'perms': fmode}, CONF_WRONGPERM) |
119 'perms': fmode}, CONF_WRONGPERM) |
119 else: |
120 else: |