docs: fix example up so it's closer to real code

issue510
David Wilson 6 years ago
parent cd01957995
commit 8d7aefb1cf

@ -137,6 +137,9 @@ We could instead express the above using Mitogen:
::
import shutil, os, subprocess
import mitogen
def run(*args):
return subprocess.check_call(args)
@ -144,6 +147,8 @@ We could instead express the above using Mitogen:
with open(path, 'rb') as fp:
return s in fp.read()
@mitogen.main()
def main(router):
device = '/dev/sdb1'
mount_point = '/media/Media Volume'

Loading…
Cancel
Save