Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37898648
en ru br
ALT Linux repositórios
S:2.21-alt3

Group :: Comunicações
RPM: pydxcluster

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: pydxcluster-use-system-config.patch
Download


diff --git a/pydxcluster/pyDxCluster_v2_21.py b/pydxcluster/pyDxCluster_v2_21.py
index 8907ca8..1997ff8 100644
--- a/pydxcluster/pyDxCluster_v2_21.py
+++ b/pydxcluster/pyDxCluster_v2_21.py
@@ -7,15 +7,26 @@
 ###################################################################################
 from Tkinter import *
 import telnetlib, string, sys, os, subprocess, re
+import shutil
 import requests
 import pygame
 
 from tkColorChooser import askcolor 
 from math import pi, sin, cos, atan2, sqrt, radians, log, tan, degrees
 
+# If $HOME/pydxcluster is not exist, create it and copy config files
+cwd = os.environ['HOME']+"/.config/pydxcluster"
+if not os.path.exists(cwd):
+	os.makedirs(cwd)
+os.chdir(cwd)
+if not os.path.exists("pydxcluster.cfg"):
+	shutil.copy2("/usr/share/pydxcluster/pydxcluster.cfg", "pydxcluster.cfg")
+if not os.path.exists("default.col"):
+	shutil.copy2("/usr/share/pydxcluster/default.col", "default.col")
+
 version="v2.21"
 pygame.mixer.init()
-pygame.mixer.music.load("bell.wav")
+pygame.mixer.music.load("/usr/share/pydxcluster/bell.wav")
 pygame.mixer.music.play()
 
 try: 
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009