Kalanyr: The gog-manifest not existing has been reported
Sorry for not checking the issues first, my software being old also results in Github's web interface failing.
Kalanyr: and I have a preliminary fix but I'm waiting to hear back from the reporter about if it works, if you'd like to try the fix:
[…]
Let me know if it works.
Works perfectly, I moved all manifest files out of the way, and called "python gogrepoc.py update" again: new files have been written. The only change I had to make before was commenting out the 3 "wakelock" lines and adding "sys.exit(1)" in place of the last (don't know much about python, so didn't test if "finally" can be safely removed).
Kalanyr: Regarding the wakelock, you're not kidding about using an older version of Debian (the current LTS release is 3 versions newer than the one where systemd became the default) , I'll wrap the wakelock so that it doesn't crash in the case that systemd doesn't exist.
Sure, I reported this nonetheless, because there are distributions without
systemd out there, for desktop machines most notably Devuan, which is essentially Debian with
systemd removed.
ChFra: You should add a "shebang" line as the first line of the script:
--8<---------------------------
#!/usr/bin/env python --8<---------------------------
Kalanyr: This is not possible, starting the file with a shebang interferes with the mechanism for python version selection on Windows. *hmm* I wonder if there's someway I can have the file error out if it's executed as a shell script that doesn't interfere with Python behaviour.
Well, I can tell you exactly what it does (LANG=de_DE.UTF-8):
--8<---------------------------
from: too many arguments
from: too many arguments
from: too many arguments
/usr/local/src/games/gogrepoc/gogrepoc.py: Zeile 7: __appname__: Kommando nicht gefunden.
/usr/local/src/games/gogrepoc/gogrepoc.py: Zeile 8: __author__: Kommando nicht gefunden.
/usr/local/src/games/gogrepoc/gogrepoc.py: Zeile 9: __version__: Kommando nicht gefunden.
/usr/local/src/games/gogrepoc/gogrepoc.py: Zeile 10: __url__: Kommando nicht gefunden.
from: too many arguments
/usr/local/src/games/gogrepoc/gogrepoc.py: Zeile 44: minPy2: Kommando nicht gefunden.
/usr/local/src/games/gogrepoc/gogrepoc.py: Zeile 45: minPy3: Kommando nicht gefunden.
/usr/local/src/games/gogrepoc/gogrepoc.py: Zeile 49: Syntaxfehler beim unerwarteten Symbol »"Your Python version is not supported, please update to 2.7+"«
/usr/local/src/games/gogrepoc/gogrepoc.py: Zeile 49: ` print("Your Python version is not supported, please update to 2.7+" )'
--8<---------------------------
Comments # are ignored by the shell, the lines beginning with "from" as the first word give "too many arguments", the other lines result in "command not found" errors, because no executable files or shell aliases of those names exist. Those errors are non-fatal, the shell keeps executing.
If Imagemagick or Graphicsmagick are installed, however,
/usr/bin/import exists and interprets the to-be-imported functions as file names to write an image to, in the current directory where the script is called from. "import" changes the mouse cursor into some cross-hair style thing, whenever you select something on-screen, a file with the selected screen contents is written, and the next instance of "import" ist started with the next name until it reaches the "if" statement.
On Bourne/Korn style shells, which are the default almost everywhere, the "if" statement requires a "then" on the next line, or after a ";" behind the "test statement". This missing "then" causes a fatal error, the shell exits out of the script.
I'm not a python programmer, so don't know if that's possible, but having a "fake if" doing effectively nothing in python right at the beginning of the file would cause any "normal" shell to quit with a fatal error.