Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
usage: mount_smbfs [-Nh] [-d mode] [-f mode] //[domain;][user[:password]@]server[/share] path Traceback (most recent call last): File "./mnt-queue.py", line 22, in <module> with mounted(remote_dir,local_dir): File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/contextlib.py", line 16, in __enter__ File "./mnt-queue.py", line 12, in mounted raise OSError("Mount operation failed") OSError: Mount operation failed
#!/usr/bin/python from contextlib import contextmanager import os import shutil import subprocess @contextmanager def mounted(remote_dir,local_dir): local_dir = os.path.abspath(local_dir) retcode = subprocess.call(["/sbin/mount", "-t","smbfs",remote_dir,local_dir]) if retcode != 0: raise OSError("Mount operation failed") try: yield finally: retcode = subprocess.call(["/sbin/umount",local_dir]) if retcode != 0: raise OSError ("Umount Operation Failed!") remote_dir = "\\server\process" local_dir = "/tmp/process" with mounted(remote_dir,local_dir): print "Processing: " , os.walk(local_dir).next()
|Lots of browser tabs open affecting system performance - bad habit||14||99|
|Where all my pictures are stored in Mac Photos application in OS Sierra?||5||40|
|Openoffice or opensource excel/word/ppt for Mac OSX Mountain Lion||14||62|
|What prospects are there for offering DTP services?||10||32|