Package: gcalcli
Version: 4.0.0~a4-1
Severity: normal
Control: tag -1 + patch
With (the default) python3, importing ICS files fail (this is a
different problem than #870384) with the following error:
Error: name 'file' is not defined!
The attached patch correct the problem.
Interestingly enough, the code on github's master[0] seems to be doing
the right thing.
Cheers,
--
Seb
[0] https://github.com/insanum/gcalcli/blob/master/gcalcli/gcalcli.py#L1491
-- System Information:
Debian Release: buster/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.18.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8),
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: systemd (via /run/systemd/system)
Versions of packages gcalcli depends on:
ii python3 3.7.1-2
ii python3-dateutil 2.7.3-1
ii python3-googleapi 1.5.5-1
ii python3-httplib2 0.11.3-1
ii python3-oauth2client 4.1.2-3
ii python3-six 1.11.0-2
Versions of packages gcalcli recommends:
pn python3-parsedatetime <none>
ii python3-vobject 0.9.6.1-0.1
gcalcli suggests no packages.
-- no debconf information
--- /usr/bin/gcalcli 2018-09-08 23:39:32.000000000 +0200
+++ /home/seb/tmp/gcalcli 2018-12-07 14:21:41.935711278 +0100
@@ -2087,7 +2087,7 @@
if icsFile:
try:
- f = file(icsFile)
+ f = open(icsFile)
except Exception as e:
PrintErrMsg("Error: " + str(e) + "!\n")
sys.exit(1)
@@ -2095,7 +2095,7 @@
while True:
try:
- v = vobject.readComponents(f).next()
+ v = next(vobject.readComponents(f))
except StopIteration:
break