1
2
3
4
5
6
7
8
9
10
11
12
13
14
16 """Exception raised if an exception is find
17 Those Types of error will stop nicely in the cmd interface"""
18
20 """a class for the invalid syntax call"""
21
24
25 import os
26 import logging
27 import time
28
29
30 MG5DIR = os.path.realpath(os.path.join(os.path.dirname(__file__),
31 os.path.pardir))
32 if ' ' in MG5DIR:
33 logging.critical('''\033[1;31mpath to MG5: "%s" contains space.
34 This is likely to create code unstability.
35 Please consider changing the path location of the code\033[0m''' % MG5DIR)
36 time.sleep(1)
37 MG4DIR = MG5DIR
38 ReadWrite = os.access(MG5DIR, os.W_OK)
39
40 if ReadWrite:
41
42 try:
43 tmp_path = pjoin(MG5DIR, 'Template','LO','Source','make_opts')
44
45 if os.path.exists(tmp_path) and os.path.getmtime(tmp_path) < 1480375724:
46 os.remove(tmp_path)
47 shutil.copy(pjoin(MG5DIR, 'Template','LO','Source','.make_opts'),
48 pjoin(MG5DIR, 'Template','LO','Source','make_opts'))
49 except Exception,error:
50 pass
51