Skip to content

Commit

Permalink
Minor fixes for disconnect, fixes #2
Browse files Browse the repository at this point in the history
  • Loading branch information
icook committed Mar 12, 2014
1 parent d453ad7 commit 5d01a52
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ppagent/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,11 @@ def transmit(self):
except socket.error:
logger.info("Problem collecting from cgminer, resetting connection")
miner.authenticated = False
miner._worker = None
except Exception:
logger.info("Unhandled exception from collection, resetting connection", exc_info=True)
miner.authenticated = False
miner._worker = None
else:
# don't distribute if we're not authenticated...
continue
Expand Down Expand Up @@ -434,7 +436,10 @@ def entry():
inst = subparsers.add_parser('install', help='install the upstart script and add user')
inst.add_argument('type', choices=['upstart', 'sysv'],
help='upstart for ubuntu, sysv for debian.')
args = parser.parse_args()
if len(sys.argv) == 1:
args = parser.parse_args(['run'])
else:
args = parser.parse_args()
configs = vars(args)

if configs['action'] == 'install':
Expand Down
2 changes: 2 additions & 0 deletions win-build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
C:/Python27/Scripts/pyinstaller ./ppagent/main.py --onefile --name=ppagent
pause

0 comments on commit 5d01a52

Please sign in to comment.