Skip to content

Commit

Permalink
import xdo module on if needed.
Browse files Browse the repository at this point in the history
This relaxes the xdo requirement.
  • Loading branch information
jrollins committed Feb 13, 2013
1 parent de1b0cc commit 74dcff5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion assword
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import json
import base64
import gpgme
import assword
import xdo
import subprocess

############################################################
Expand Down Expand Up @@ -179,6 +178,12 @@ See 'assword help' for more information."""
def xsearch(args, method='xdo'):
query = ' '.join(args)
if method == 'xdo':
try:
import xdo
except:
print >>sys.stderr, "The xdo module is not found, so the 'xdo' paste method is not available."
print >>sys.stderr, "Please install python-xdo."
sys.exit()
# initialize xdo
x = xdo.xdo()
# get the id of the currently focused window
Expand Down

0 comments on commit 74dcff5

Please sign in to comment.