infinitepush: lint fixes

Summary:
Remove generic exception.
Remove trailing whitespace.
Remove unused import

#accept2ship

Test Plan: Run `test-check-code-hg.t` and `test-infinitepush-bundlestore.t`

Reviewers: #sourcecontrol, ttung, jeroenv

Reviewed By: jeroenv

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3876225

Signature: t1:3876225:1474015261:adff2496c4e36f19e3315856f1a0102eb7e9dc7e
This commit is contained in:
Stanislau Hlebik 2016-09-16 01:45:33 -07:00
parent d098615fe2
commit 21b475a2f0
2 changed files with 5 additions and 4 deletions

View File

@ -2,7 +2,6 @@ import os
import time
import logging
from mercurial import error
import warnings
import mysql.connector
@ -41,6 +40,8 @@ class indexapi(object):
"""Returns bookmarks that match the query"""
raise NotImplementedError()
class indexexception(Exception):
pass
class sqlindexapi(indexapi):
'''
@ -86,9 +87,9 @@ class sqlindexapi(indexapi):
def sqlconnect(self):
if self.sqlconn:
raise Exception("SQL connection already open")
raise indexexception("SQL connection already open")
if self.sqlcursor:
raise Exception("SQL cursor already open without connection")
raise indexexception("SQL cursor already open without connection")
retry = 3
while True:
try:

View File

@ -124,7 +124,7 @@ Push to non-scratch bookmark
|/
o initialcommit public
Push to scratch branch
$ cd ../client2
$ hg up -q scratch/mybranch