summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavierCLL2017-03-24 14:18:44 -0500
committerXavierCLL2017-03-24 14:18:44 -0500
commit920b341344d90d0bc294352eb2bc35326094c64c (patch)
treef2fc6670df60f2c0fa3d104f757b08d26d169b68
parent2ac320bbf9aec05f35db7c6d2b8601c41db8c446 (diff)
downloadaur-920b341344d90d0bc294352eb2bc35326094c64c.tar.gz
Updated charm
-rw-r--r--[-rwxr-xr-x]charm18
1 files changed, 9 insertions, 9 deletions
diff --git a/charm b/charm
index 29c4302487e..0523f731dde 100755..100644
--- a/charm
+++ b/charm
@@ -10,13 +10,14 @@ import time
# see com.intellij.idea.SocketLock for the server side of this interface
RUN_PATH = u'/opt/pycharm-professional/bin/pycharm.sh'
-CONFIG_PATH = u'~/.PyCharm2016.3/config'
-SYSTEM_PATH = u'~/.PyCharm2016.3/system'
+CONFIG_PATH = u'~/.PyCharm2017.1/config'
+SYSTEM_PATH = u'~/.PyCharm2017.1/system'
def print_usage(cmd):
print(('Usage:\n' +
' {0} -h | -? | --help\n' +
- ' {0} [-l|--line line] file[:line]\n' +
+ ' {0} [project_dir]\n' +
+ ' {0} [-l|--line line] [project_dir|--temp-project] file[:line]\n' +
' {0} diff <left> <right>\n' +
' {0} merge <local> <remote> [base] <merged>').format(cmd))
@@ -40,16 +41,14 @@ def process_args(argv):
args.append(arg)
skip_next = False
else:
+ path = arg
if ':' in arg:
file_path, line_number = arg.rsplit(':', 1)
if line_number.isdigit():
args.append('-l')
args.append(line_number)
- args.append(os.path.abspath(file_path))
- else:
- args.append(os.path.abspath(arg))
- else:
- args.append(os.path.abspath(arg))
+ path = file_path
+ args.append(os.path.abspath(path))
return args
@@ -60,8 +59,9 @@ def try_activate_instance(args):
if not (os.path.exists(port_path) and os.path.exists(token_path)):
return False
- with open(port_path) as pf, open(token_path) as tf:
+ with open(port_path) as pf:
port = int(pf.read())
+ with open(token_path) as tf:
token = tf.read()
s = socket.socket()