cmd = "~/bin/dtc %s %s --json" % (args[0], args[1])
else:
return None
- proc = subprocess.Popen(["ssh", config.distant_server, cmd], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ proc = subprocess.Popen(["ssh", "-4", config.distant_server, cmd], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, err = proc.communicate()
out += err
quotes = json.loads(out)
def check_all():
"""Vérifie si il y a des derniers trucs non lus/vus."""
cmd = "%s whatsup" % (config.path_today_server,)
- proc = subprocess.Popen(["ssh", config.distant_server, cmd], stdout=subprocess.PIPE)
+ proc = subprocess.Popen(["ssh", "-4", config.distant_server, cmd], stdout=subprocess.PIPE)
out, err = proc.communicate()
news = json.loads(out)
seen = get_last_seen()
le maximum de chaque truc vu est gardé des deux côtés."""
lasts = get_last_seen()
cmd = "%s sync" % (config.path_today_server,)
- proc = subprocess.Popen(["ssh", config.distant_server, cmd],
+ proc = subprocess.Popen(["ssh", "-4", config.distant_server, cmd],
stdin = subprocess.PIPE, stdout=subprocess.PIPE,
close_fds = True)
lasts_raw = json.dumps(lasts)