only load pyfilesystem in debug mode
This commit is contained in:
parent
5b5c8acdcb
commit
ed9237f610
1 changed files with 9 additions and 6 deletions
|
@ -1,14 +1,17 @@
|
||||||
import logging, os, sys, time
|
import logging, os, sys, time
|
||||||
import threading
|
import threading
|
||||||
|
from Config import config
|
||||||
|
|
||||||
try:
|
if config.debug: # Only load pyfilesytem if using debug mode
|
||||||
from fs.osfs import OSFS
|
try:
|
||||||
pyfilesystem = OSFS("src")
|
from fs.osfs import OSFS
|
||||||
except Exception, err:
|
pyfilesystem = OSFS("src")
|
||||||
logging.info("%s: For autoreload please download pyfilesystem (https://code.google.com/p/pyfilesystem/)" % err)
|
except Exception, err:
|
||||||
|
logging.debug("%s: For autoreload please download pyfilesystem (https://code.google.com/p/pyfilesystem/)" % err)
|
||||||
|
pyfilesystem = False
|
||||||
|
else:
|
||||||
pyfilesystem = False
|
pyfilesystem = False
|
||||||
|
|
||||||
|
|
||||||
class DebugReloader:
|
class DebugReloader:
|
||||||
def __init__ (self, callback, directory = "/"):
|
def __init__ (self, callback, directory = "/"):
|
||||||
self.last_chaged = 0
|
self.last_chaged = 0
|
||||||
|
|
Loading…
Reference in a new issue