projects
/
saartuer.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
my senf to ralfs senf to tuerd
[saartuer.git]
/
tuerd
diff --git
a/tuerd
b/tuerd
index 00b2420aade8493b21940f9d14ef2e0735e38d7b..5884d131e1b0d26b0bd67a9f107879a1d907087b 100755
(executable)
--- a/
tuerd
+++ b/
tuerd
@@
-1,5
+1,5
@@
#!/usr/bin/python3
#!/usr/bin/python3
-import time, socket, os, stat, atexit
+import time, socket, os, stat, atexit
, errno
from datetime import datetime
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BOARD)
from datetime import datetime
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BOARD)
@@
-25,8
+25,12
@@
def doNothing (conn):
# delete a file, don't care if it did not exist in the first place
def forcerm(name):
# delete a file, don't care if it did not exist in the first place
def forcerm(name):
-
if os.path.exists(name)
:
+
try
:
os.unlink (name)
os.unlink (name)
+ except OSError as e:
+ # only ignore error if it was "file didn't exist"
+ if e.errno != errno.ENOENT:
+ raise
# commands: on a pin do a series of timed on/off switches
class Pinoutput:
# commands: on a pin do a series of timed on/off switches
class Pinoutput: