Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cc-cli
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirror
cc-cli
Commits
e8c52e53
Commit
e8c52e53
authored
14 years ago
by
Seblu
Browse files
Options
Downloads
Patches
Plain Diff
Implement
http://standards.freedesktop.org/basedir-spec/0.6/
parent
aac3ab2b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bin/cc-cli
+12
-10
12 additions, 10 deletions
bin/cc-cli
debian/control
+1
-1
1 addition, 1 deletion
debian/control
with
13 additions
and
11 deletions
bin/cc-cli
+
12
−
10
View file @
e8c52e53
...
...
@@ -12,30 +12,32 @@ import ConfigParser
import
pprint
import
re
import
warnings
from
xdg
import
BaseDirectory
import
cccli
from
cccli.cli
import
Cli
from
cccli.printer
import
Printer
from
cccli.exception
import
*
canonical_name
=
"
cc-cli
"
settings
=
{
"
port
"
:
"
1984
"
,
"
timeout
"
:
"
5
"
,
"
hsize
"
:
"
100
"
"
hsize
"
:
"
100
"
,
"
config
"
:
"
%s/cli
"
%
BaseDirectory
.
save_config_path
(
canonical_name
),
"
alias
"
:
"
%s/alias
"
%
BaseDirectory
.
save_config_path
(
canonical_name
),
"
history
"
:
"
%s/history
"
%
BaseDirectory
.
save_data_path
(
canonical_name
),
}
printer
=
Printer
(
False
)
try
:
# parse rc file
if
"
HOME
"
in
os
.
environ
:
settings
[
"
alias
"
]
=
"
%s/.cc-cli.conf
"
%
os
.
environ
[
"
HOME
"
]
settings
[
"
history
"
]
=
"
%s/.cc-cli.history
"
%
os
.
environ
[
"
HOME
"
]
if
os
.
access
(
"
%s/.cc-cli.conf
"
%
os
.
environ
[
"
HOME
"
],
os
.
R_OK
):
fparser
=
ConfigParser
.
SafeConfigParser
()
fparser
.
read
(
"
%s/.cc-cli.conf
"
%
os
.
environ
[
"
HOME
"
])
if
fparser
.
has_section
(
"
cli
"
):
settings
.
update
(
fparser
.
items
(
"
cli
"
))
# parse config file
if
os
.
access
(
settings
[
"
config
"
],
os
.
R_OK
):
fparser
=
ConfigParser
.
SafeConfigParser
()
fparser
.
read
(
settings
[
"
config
"
])
if
fparser
.
has_section
(
"
cli
"
):
settings
.
update
(
fparser
.
items
(
"
cli
"
))
# parse env
if
"
CC_SERVER
"
in
os
.
environ
:
...
...
This diff is collapsed.
Click to expand it.
debian/control
+
1
−
1
View file @
e8c52e53
...
...
@@ -9,7 +9,7 @@ Standards-Version: 3.8.0
Package: cc-cli
Architecture: all
Depends: ${misc:Depends}, ${python:Depends}, python (<< 3), python-sjrpc (>= 7)
Depends: ${misc:Depends}, ${python:Depends}, python (<< 3), python-sjrpc (>= 7)
, python-xdg
XB-Python-Version: ${python:Versions}
Description: CloudControl CLI
This package provides the Command Line Interface to CloudControl.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment