Skip to content

Commit

Permalink
issue #31 and #32, logger removed and added python version check for…
Browse files Browse the repository at this point in the history
… disk usage
  • Loading branch information
cstrassburg committed Apr 24, 2016
1 parent e27fc6a commit 69d0062
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions lib/env/stat.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@
import ephem

if sh.env.system.libs.ephem_version is not None:
logger.info('Ephem Version: {0}'.format(ephem.__version__))
sh.env.system.libs.ephem_version( ephem.__version__ )



# lib/env/statistic.py

# Garbage
Expand Down Expand Up @@ -39,12 +37,13 @@
sh.env.system.load(round(l5, 2))

# Diskusage
pathname = os.path.dirname(sys.argv[0])
du = shutil.disk_usage( os.path.abspath(pathname))
sh.env.system.diskfree( du.free )
sh.env.system.disksize( du.total )
sh.env.system.diskusage( du.used )
sh.env.system.diskusagepercent( round(du.used / du.total * 100.0,2) )
if sys.version_info > (3,3):
pathname = os.path.dirname(sys.argv[0])
du = shutil.disk_usage( os.path.abspath(pathname))
sh.env.system.diskfree( du.free )
sh.env.system.disksize( du.total )
sh.env.system.diskusage( du.used )
sh.env.system.diskusagepercent( round(du.used / du.total * 100.0,2) )

if sh.moon:
sh.env.location.moonlight(sh.moon.light())
Expand Down

0 comments on commit 69d0062

Please sign in to comment.