MCPcopy Create free account
hub / github.com/aitjcize/cppman / update_man3_link

Function update_man3_link

cppman/util.py:62–79  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

60
61
62def update_man3_link():
63 man3_path = os.path.join(environ.cache_dir, 'man3')
64
65 if os.path.lexists(man3_path):
66 if os.path.islink(man3_path):
67 if os.readlink(man3_path) == environ.config.Source:
68 return
69 else:
70 os.unlink(man3_path)
71 else:
72 raise RuntimeError("Can't create link since `%s' already exists" %
73 man3_path)
74 try:
75 os.makedirs(os.path.join(environ.cache_dir, environ.config.Source))
76 except Exception:
77 pass
78
79 os.symlink(environ.config.Source, man3_path)
80
81
82def get_width():

Callers 1

environ.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected