我正在尝试从 github (https://github.com/danielfullmer/nzbfs)安装(python setup.py install)一些python包,但得到
SyntaxError: ('invalid syntax', ('build/bdist.linux-x86_64/egg/nzbfs/fs.py', 135, 15, " for key in ('st_atime', 'st_ctime', 'st_gid', 'st_mode', 'st_mtime', 'st_nlink', 'st_size', 'st_uid'):\n"))
怎么了?在 debian 上尝试了 python2.6 + 3.1 但总是卡在那条for key ..
线上
def getattr(self, path, fh=None):
st = os.lstat(self.db_root + path)
d = {
key: getattr(st, key)
for key in ('st_atime', 'st_ctime', 'st_gid', 'st_mode',
'st_mtime', 'st_nlink', 'st_size', 'st_uid')
}
if stat.S_ISREG(st.st_mode):
nzf_size = get_nzf_attr(self.db_root + path, 'size')
if nzf_size is not None:
d['st_size'] = nzf_size
nzf_mtime = get_nzf_attr(self.db_root + path, 'mtime')
if nzf_mtime is not None:
d['st_mtime'] = nzf_mtime
d['st_blocks'] = d['st_size'] / 512
return d