# Conflicts:
#	.idea/workspace.xml
#	git.py
This commit is contained in:
Saturneic 2019-03-14 03:28:18 +08:00
parent 95ebb9af11
commit e2402a9536
9 changed files with 360 additions and 141 deletions

306
.idea/workspace.xml generated
View File

@ -2,10 +2,15 @@
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="d703f139-38f3-455d-a086-a2da561870b5" name="Default Changelist" comment=""> <list default="true" id="d703f139-38f3-455d-a086-a2da561870b5" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/gitignore.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/branchmanager.py" beforeDir="false" afterPath="$PROJECT_DIR$/branchmanager.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/change.py" beforeDir="false" afterPath="$PROJECT_DIR$/change.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/git.py" beforeDir="false" afterPath="$PROJECT_DIR$/git.py" afterDir="false" /> <change beforePath="$PROJECT_DIR$/git.py" beforeDir="false" afterPath="$PROJECT_DIR$/git.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/keygen.py" beforeDir="false" afterPath="$PROJECT_DIR$/keygen.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" /> <change beforePath="$PROJECT_DIR$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ssh.py" beforeDir="false" afterPath="$PROJECT_DIR$/ssh.py" afterDir="false" /> <change beforePath="$PROJECT_DIR$/ssh.py" beforeDir="false" afterPath="$PROJECT_DIR$/ssh.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/sshtool.py" beforeDir="false" afterPath="$PROJECT_DIR$/sshtool.py" afterDir="false" />
</list> </list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
@ -14,10 +19,11 @@
<option name="LAST_RESOLUTION" value="IGNORE" /> <option name="LAST_RESOLUTION" value="IGNORE" />
</component> </component>
<component name="CoverageDataManager"> <component name="CoverageDataManager">
<SUITE FILE_PATH="coverage/giteasy$main.coverage" NAME="main Coverage Results" MODIFIED="1552496462912" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" /> <SUITE FILE_PATH="coverage/giteasy$main.coverage" NAME="main Coverage Results" MODIFIED="1552505207202" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
<SUITE FILE_PATH="coverage/giteasy$Debug.coverage" NAME="Debug Coverage Results" MODIFIED="1552305147101" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" /> <SUITE FILE_PATH="coverage/giteasy$Debug.coverage" NAME="Debug Coverage Results" MODIFIED="1552305147101" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
<SUITE FILE_PATH="coverage/giteasy$ssh.coverage" NAME="ssh Coverage Results" MODIFIED="1552191792390" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" /> <SUITE FILE_PATH="coverage/giteasy$ssh.coverage" NAME="ssh Coverage Results" MODIFIED="1552191792390" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
<SUITE FILE_PATH="coverage/giteasy$window.coverage" NAME="window Coverage Results" MODIFIED="1552378199288" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" /> <SUITE FILE_PATH="coverage/giteasy$window.coverage" NAME="window Coverage Results" MODIFIED="1552378199288" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
<SUITE FILE_PATH="coverage/giteasy$gitignore.coverage" NAME="gitignore Coverage Results" MODIFIED="1552502134263" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
<SUITE FILE_PATH="coverage/giteasy$branchmanager.coverage" NAME="branchmanager Coverage Results" MODIFIED="1552413252082" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" /> <SUITE FILE_PATH="coverage/giteasy$branchmanager.coverage" NAME="branchmanager Coverage Results" MODIFIED="1552413252082" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
<SUITE FILE_PATH="coverage/giteasy$keygen.coverage" NAME="keygen Coverage Results" MODIFIED="1552305621065" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" /> <SUITE FILE_PATH="coverage/giteasy$keygen.coverage" NAME="keygen Coverage Results" MODIFIED="1552305621065" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
</component> </component>
@ -41,30 +47,33 @@
<counts> <counts>
<entry key="project.closed" value="3" /> <entry key="project.closed" value="3" />
<entry key="project.open.time.0" value="1" /> <entry key="project.open.time.0" value="1" />
<entry key="project.open.time.1" value="1" />
<entry key="project.open.time.13" value="1" /> <entry key="project.open.time.13" value="1" />
<entry key="project.open.time.16" value="1" /> <entry key="project.open.time.16" value="1" />
<entry key="project.open.time.8" value="1" /> <entry key="project.open.time.8" value="1" />
<entry key="project.opened" value="4" /> <entry key="project.opened" value="5" />
</counts> </counts>
</usages-collector> </usages-collector>
<usages-collector id="statistics.file.extensions.edit"> <usages-collector id="statistics.file.extensions.edit">
<counts> <counts>
<entry key="py" value="11904" /> <entry key="py" value="13744" />
</counts> </counts>
</usages-collector> </usages-collector>
<usages-collector id="statistics.file.types.edit"> <usages-collector id="statistics.file.types.edit">
<counts> <counts>
<entry key="Python" value="11904" /> <entry key="Python" value="13744" />
</counts> </counts>
</usages-collector> </usages-collector>
<usages-collector id="statistics.file.extensions.open"> <usages-collector id="statistics.file.extensions.open">
<counts> <counts>
<entry key="py" value="7" /> <entry key="gitignore" value="1" />
<entry key="py" value="9" />
</counts> </counts>
</usages-collector> </usages-collector>
<usages-collector id="statistics.file.types.open"> <usages-collector id="statistics.file.types.open">
<counts> <counts>
<entry key="Python" value="7" /> <entry key="PLAIN_TEXT" value="1" />
<entry key="Python" value="9" />
</counts> </counts>
</usages-collector> </usages-collector>
</session> </session>
@ -74,21 +83,56 @@
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/git.py"> <entry file="file://$PROJECT_DIR$/git.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="226"> <state relative-caret-position="964">
<caret line="49" column="42" selection-start-line="49" selection-start-column="42" selection-end-line="49" selection-end-column="42" /> <caret line="363" column="18" selection-start-line="363" selection-start-column="8" selection-end-line="363" selection-end-column="18" />
<folding> <folding>
<element signature="e#0#9#0" expanded="true" /> <element signature="e#0#9#0" expanded="true" />
<marker date="1552496550761" expanded="true" signature="13921:14647" ph="..." /> <marker date="1552502491096" expanded="true" signature="15776:16149" ph="..." />
</folding> </folding>
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
<file pinned="false" current-in-tab="true"> <file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/gitignore.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="271">
<caret line="48" column="54" selection-start-line="48" selection-start-column="54" selection-end-line="48" selection-end-column="54" />
<folding>
<element signature="e#0#21#0" expanded="true" />
<marker date="1552505203214" expanded="true" signature="210:215" ph="..." />
<marker date="1552505203214" expanded="true" signature="1327:1771" ph="..." />
<marker date="1552505203214" expanded="true" signature="1790:2180" ph="..." />
<marker date="1552505203214" expanded="true" signature="2198:2414" ph="..." />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/branchmanager.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="585">
<caret line="39" column="36" selection-start-line="39" selection-start-column="36" selection-end-line="39" selection-end-column="36" />
<folding>
<element signature="e#0#21#0" expanded="true" />
<marker date="1552498217714" expanded="true" signature="178:183" ph="..." />
<marker date="1552498217714" expanded="true" signature="2638:3584" ph="..." />
<marker date="1552498217714" expanded="true" signature="3602:3805" ph="..." />
<marker date="1552498217714" expanded="true" signature="3822:3937" ph="..." />
<marker date="1552498217714" expanded="true" signature="3963:4427" ph="..." />
<marker date="1552498217714" expanded="true" signature="4449:5138" ph="..." />
<marker date="1552498217714" expanded="true" signature="5456:6107" ph="..." />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/ssh.py"> <entry file="file://$PROJECT_DIR$/ssh.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-282"> <state relative-caret-position="174">
<caret line="4" column="30" selection-start-line="4" selection-start-column="30" selection-end-line="4" selection-end-column="30" /> <caret line="18" column="70" selection-start-line="18" selection-start-column="70" selection-end-line="18" selection-end-column="70" />
</state> </state>
</provider> </provider>
</entry> </entry>
@ -96,8 +140,8 @@
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/keygen.py"> <entry file="file://$PROJECT_DIR$/keygen.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="120"> <state relative-caret-position="363">
<caret line="27" column="27" selection-start-line="27" selection-start-column="27" selection-end-line="27" selection-end-column="27" /> <caret line="33" column="8" selection-start-line="33" selection-start-column="8" selection-end-line="35" selection-end-column="52" />
<folding> <folding>
<element signature="e#0#10#0" expanded="true" /> <element signature="e#0#10#0" expanded="true" />
</folding> </folding>
@ -105,26 +149,14 @@
</provider> </provider>
</entry> </entry>
</file> </file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/window.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="75">
<caret line="7" column="15" selection-start-line="7" selection-start-column="8" selection-end-line="7" selection-end-column="15" />
<folding>
<element signature="e#0#21#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/main.py"> <entry file="file://$PROJECT_DIR$/main.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="414"> <state relative-caret-position="194">
<caret line="93" column="22" lean-forward="true" selection-start-line="93" selection-start-column="22" selection-end-line="93" selection-end-column="22" /> <caret line="392" column="58" selection-start-line="392" selection-start-column="58" selection-end-line="392" selection-end-column="58" />
<folding> <folding>
<element signature="e#0#21#0" expanded="true" /> <element signature="e#0#21#0" expanded="true" />
<marker date="1552494762449" expanded="true" signature="16338:16344" ph="..." /> <marker date="1552502491089" expanded="true" signature="16491:16734" ph="..." />
</folding> </folding>
</state> </state>
</provider> </provider>
@ -133,7 +165,7 @@
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/info.py"> <entry file="file://$PROJECT_DIR$/info.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="75"> <state relative-caret-position="105">
<caret line="8" column="27" selection-start-line="8" selection-start-column="27" selection-end-line="8" selection-end-column="27" /> <caret line="8" column="27" selection-start-line="8" selection-start-column="27" selection-end-line="8" selection-end-column="27" />
<folding> <folding>
<element signature="e#0#21#0" expanded="true" /> <element signature="e#0#21#0" expanded="true" />
@ -145,8 +177,8 @@
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/change.py"> <entry file="file://$PROJECT_DIR$/change.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="135"> <state relative-caret-position="111">
<caret line="14" column="37" selection-start-line="14" selection-start-column="37" selection-end-line="14" selection-end-column="37" /> <caret line="46" column="61" selection-start-line="46" selection-start-column="61" selection-end-line="46" selection-end-column="61" />
<folding> <folding>
<element signature="e#0#21#0" expanded="true" /> <element signature="e#0#21#0" expanded="true" />
</folding> </folding>
@ -157,30 +189,10 @@
<file pinned="false" current-in-tab="false"> <file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/sshtool.py"> <entry file="file://$PROJECT_DIR$/sshtool.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="15"> <state relative-caret-position="249">
<caret line="6" selection-start-line="6" selection-end-line="6" /> <caret line="41" column="57" selection-start-line="41" selection-start-column="57" selection-end-line="41" selection-end-column="57" />
<folding> <folding>
<element signature="e#0#21#0" expanded="true" /> <element signature="e#0#21#0" expanded="true" />
<marker date="1552409960112" expanded="true" signature="1144:1635" ph="..." />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/branchmanager.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="900">
<caret line="66" column="24" selection-start-line="66" selection-start-column="24" selection-end-line="66" selection-end-column="24" />
<folding>
<element signature="e#0#21#0" expanded="true" />
<marker date="1552415132051" expanded="true" signature="178:183" ph="..." />
<marker date="1552415132051" expanded="true" signature="2638:3140" ph="..." />
<marker date="1552415132051" expanded="true" signature="3158:3361" ph="..." />
<marker date="1552415132051" expanded="true" signature="3378:3493" ph="..." />
<marker date="1552415132051" expanded="true" signature="3519:3983" ph="..." />
<marker date="1552415132051" expanded="true" signature="4005:4694" ph="..." />
<marker date="1552415132051" expanded="true" signature="5012:5663" ph="..." />
</folding> </folding>
</state> </state>
</provider> </provider>
@ -213,12 +225,15 @@
<option value="$PROJECT_DIR$/venv/ssh.py" /> <option value="$PROJECT_DIR$/venv/ssh.py" />
<option value="$PROJECT_DIR$/server.py" /> <option value="$PROJECT_DIR$/server.py" />
<option value="$PROJECT_DIR$/window.py" /> <option value="$PROJECT_DIR$/window.py" />
<option value="$PROJECT_DIR$/keygen.py" />
<option value="$PROJECT_DIR$/change.py" />
<option value="$PROJECT_DIR$/sshtool.py" />
<option value="$PROJECT_DIR$/info.py" /> <option value="$PROJECT_DIR$/info.py" />
<option value="$PROJECT_DIR$/keygen.py" />
<option value="$PROJECT_DIR$/ssh.py" />
<option value="$PROJECT_DIR$/sshtool.py" />
<option value="$PROJECT_DIR$/branchmanager.py" /> <option value="$PROJECT_DIR$/branchmanager.py" />
<option value="$PROJECT_DIR$/git.py" />
<option value="$PROJECT_DIR$/main.py" /> <option value="$PROJECT_DIR$/main.py" />
<option value="$PROJECT_DIR$/change.py" />
<option value="$PROJECT_DIR$/gitignore.py" />
</list> </list>
</option> </option>
</component> </component>
@ -349,6 +364,28 @@
<option name="INPUT_FILE" value="" /> <option name="INPUT_FILE" value="" />
<method v="2" /> <method v="2" />
</configuration> </configuration>
<configuration name="gitignore" type="PythonConfigurationType" factoryName="Python" temporary="true">
<module name="giteasy" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="$PROJECT_DIR$/bin/python" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/gitignore.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<configuration name="keygen" type="PythonConfigurationType" factoryName="Python"> <configuration name="keygen" type="PythonConfigurationType" factoryName="Python">
<module name="giteasy" /> <module name="giteasy" />
<option name="INTERPRETER_OPTIONS" value="" /> <option name="INTERPRETER_OPTIONS" value="" />
@ -421,10 +458,12 @@
<item itemvalue="Python.window" /> <item itemvalue="Python.window" />
<item itemvalue="Python.main" /> <item itemvalue="Python.main" />
<item itemvalue="Python.branchmanager" /> <item itemvalue="Python.branchmanager" />
<item itemvalue="Python.gitignore" />
</list> </list>
<recent_temporary> <recent_temporary>
<list> <list>
<item itemvalue="Python.main" /> <item itemvalue="Python.main" />
<item itemvalue="Python.gitignore" />
<item itemvalue="Python.branchmanager" /> <item itemvalue="Python.branchmanager" />
<item itemvalue="Python.window" /> <item itemvalue="Python.window" />
</list> </list>
@ -470,7 +509,14 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1552464026503</updated> <updated>1552464026503</updated>
</task> </task>
<option name="localTasksCounter" value="5" /> <task id="LOCAL-00005" summary="Merge branch 'master' of https://github.com/saturneric/giteasy&#10;&#10;# Conflicts:&#10;#&#9;.idea/workspace.xml&#10;#&#9;git.py">
<created>1552497233864</created>
<option name="number" value="00005" />
<option name="presentableId" value="LOCAL-00005" />
<option name="project" value="LOCAL" />
<updated>1552497233864</updated>
</task>
<option name="localTasksCounter" value="6" />
<servers /> <servers />
</component> </component>
<component name="TimeTrackingManager"> <component name="TimeTrackingManager">
@ -478,19 +524,20 @@
</component> </component>
<component name="ToolWindowManager"> <component name="ToolWindowManager">
<frame x="0" y="23" width="1440" height="811" extended-state="0" /> <frame x="0" y="23" width="1440" height="811" extended-state="0" />
<editor active="true" />
<layout> <layout>
<window_info id="Favorites" order="0" side_tool="true" /> <window_info id="Favorites" order="0" side_tool="true" />
<window_info content_ui="combo" id="Project" order="1" visible="true" weight="0.14663805" /> <window_info content_ui="combo" id="Project" order="1" visible="true" weight="0.14878398" />
<window_info id="Structure" order="2" side_tool="true" weight="0.25" /> <window_info id="Structure" order="2" side_tool="true" weight="0.25" />
<window_info anchor="bottom" id="Database Changes" order="0" show_stripe_button="false" /> <window_info anchor="bottom" id="Database Changes" order="0" show_stripe_button="false" />
<window_info anchor="bottom" id="Terminal" order="1" sideWeight="0.4985694" weight="0.32962447" /> <window_info anchor="bottom" id="Terminal" order="1" sideWeight="0.4985694" weight="0.32962447" />
<window_info anchor="bottom" id="Event Log" order="2" sideWeight="0.50500715" side_tool="true" visible="true" weight="0.2628651" /> <window_info anchor="bottom" id="Event Log" order="2" sideWeight="0.50572246" side_tool="true" visible="true" weight="0.2628651" />
<window_info anchor="bottom" id="Version Control" order="3" sideWeight="0.4985694" weight="0.32962447" /> <window_info anchor="bottom" id="Version Control" order="3" sideWeight="0.4985694" weight="0.32962447" />
<window_info anchor="bottom" id="Python Console" order="4" weight="0.3286517" /> <window_info anchor="bottom" id="Python Console" order="4" weight="0.3286517" />
<window_info anchor="bottom" id="Docker" order="5" show_stripe_button="false" /> <window_info anchor="bottom" id="Docker" order="5" show_stripe_button="false" />
<window_info anchor="bottom" id="Message" order="6" /> <window_info anchor="bottom" id="Message" order="6" />
<window_info anchor="bottom" id="Find" order="7" weight="0.329718" /> <window_info anchor="bottom" id="Find" order="7" weight="0.329718" />
<window_info anchor="bottom" id="Run" order="8" sideWeight="0.49499285" weight="0.2628651" /> <window_info active="true" anchor="bottom" id="Run" order="8" sideWeight="0.49427754" visible="true" weight="0.2628651" />
<window_info anchor="bottom" id="Debug" order="9" sideWeight="0.49928468" weight="0.30737135" /> <window_info anchor="bottom" id="Debug" order="9" sideWeight="0.49928468" weight="0.30737135" />
<window_info anchor="bottom" id="Cvs" order="10" weight="0.25" /> <window_info anchor="bottom" id="Cvs" order="10" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="11" weight="0.4" /> <window_info anchor="bottom" id="Inspection" order="11" weight="0.4" />
@ -510,7 +557,8 @@
</component> </component>
<component name="VcsManagerConfiguration"> <component name="VcsManagerConfiguration">
<MESSAGE value="Fixed and Added." /> <MESSAGE value="Fixed and Added." />
<option name="LAST_COMMIT_MESSAGE" value="Fixed and Added." /> <MESSAGE value="Merge branch 'master' of https://github.com/saturneric/giteasy&#10;&#10;# Conflicts:&#10;#&#9;.idea/workspace.xml&#10;#&#9;git.py" />
<option name="LAST_COMMIT_MESSAGE" value="Merge branch 'master' of https://github.com/saturneric/giteasy&#10;&#10;# Conflicts:&#10;#&#9;.idea/workspace.xml&#10;#&#9;git.py" />
</component> </component>
<component name="XDebuggerManager"> <component name="XDebuggerManager">
<breakpoint-manager> <breakpoint-manager>
@ -538,47 +586,6 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/info.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="75">
<caret line="8" column="27" selection-start-line="8" selection-start-column="27" selection-end-line="8" selection-end-column="27" />
<folding>
<element signature="e#0#21#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/change.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="135">
<caret line="14" column="37" selection-start-line="14" selection-start-column="37" selection-end-line="14" selection-end-column="37" />
<folding>
<element signature="e#0#21#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/sshtool.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="15">
<caret line="6" selection-start-line="6" selection-end-line="6" />
<folding>
<element signature="e#0#21#0" expanded="true" />
<marker date="1552409960112" expanded="true" signature="1144:1635" ph="..." />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/branchmanager.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="120">
<caret line="8" column="27" selection-start-line="8" selection-start-column="27" selection-end-line="8" selection-end-column="27" />
<folding>
<element signature="e#0#21#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/window.py"> <entry file="file://$PROJECT_DIR$/window.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="75"> <state relative-caret-position="75">
@ -589,43 +596,108 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/keygen.py"> <entry file="file://$PROJECT_DIR$/info.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="360"> <state relative-caret-position="105">
<caret line="27" column="27" selection-start-line="27" selection-start-column="27" selection-end-line="27" selection-end-column="27" /> <caret line="8" column="27" selection-start-line="8" selection-start-column="27" selection-end-line="8" selection-end-column="27" />
<folding> <folding>
<element signature="e#0#21#0" expanded="true" /> <element signature="e#0#21#0" expanded="true" />
<marker date="1552409960112" expanded="true" signature="1144:1635" ph="..." />
</folding> </folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/git.py"> <entry file="file://$PROJECT_DIR$/keygen.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="454"> <state relative-caret-position="363">
<caret line="233" column="34" lean-forward="true" selection-start-line="233" selection-start-column="34" selection-end-line="233" selection-end-column="34" /> <caret line="33" column="8" selection-start-line="33" selection-start-column="8" selection-end-line="35" selection-end-column="52" />
<folding> <folding>
<element signature="e#0#9#0" expanded="true" /> <element signature="e#0#10#0" expanded="true" />
<marker date="1552496550761" expanded="true" signature="13921:14647" ph="..." /> </folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/sshtool.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="249">
<caret line="41" column="57" selection-start-line="41" selection-start-column="57" selection-end-line="41" selection-end-column="57" />
<folding>
<element signature="e#0#21#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/.gitignore">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-1298" />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/ssh.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="174">
<caret line="18" column="70" selection-start-line="18" selection-start-column="70" selection-end-line="18" selection-end-column="70" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/branchmanager.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="585">
<caret line="39" column="36" selection-start-line="39" selection-start-column="36" selection-end-line="39" selection-end-column="36" />
<folding>
<element signature="e#0#21#0" expanded="true" />
<marker date="1552498217714" expanded="true" signature="178:183" ph="..." />
<marker date="1552498217714" expanded="true" signature="2638:3584" ph="..." />
<marker date="1552498217714" expanded="true" signature="3602:3805" ph="..." />
<marker date="1552498217714" expanded="true" signature="3822:3937" ph="..." />
<marker date="1552498217714" expanded="true" signature="3963:4427" ph="..." />
<marker date="1552498217714" expanded="true" signature="4449:5138" ph="..." />
<marker date="1552498217714" expanded="true" signature="5456:6107" ph="..." />
</folding> </folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/main.py"> <entry file="file://$PROJECT_DIR$/main.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="414"> <state relative-caret-position="194">
<caret line="93" column="22" lean-forward="true" selection-start-line="93" selection-start-column="22" selection-end-line="93" selection-end-column="22" /> <caret line="392" column="58" selection-start-line="392" selection-start-column="58" selection-end-line="392" selection-end-column="58" />
<folding> <folding>
<element signature="e#0#21#0" expanded="true" /> <element signature="e#0#21#0" expanded="true" />
<marker date="1552453766451" expanded="true" signature="15701:15707" ph="..." /> <marker date="1552502491089" expanded="true" signature="16491:16734" ph="..." />
</folding> </folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/ssh.py"> <entry file="file://$PROJECT_DIR$/change.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-282"> <state relative-caret-position="111">
<caret line="4" column="30" selection-start-line="4" selection-start-column="30" selection-end-line="4" selection-end-column="30" /> <caret line="46" column="61" selection-start-line="46" selection-start-column="61" selection-end-line="46" selection-end-column="61" />
<folding>
<element signature="e#0#21#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/git.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="964">
<caret line="363" column="18" selection-start-line="363" selection-start-column="8" selection-end-line="363" selection-end-column="18" />
<folding>
<element signature="e#0#9#0" expanded="true" />
<marker date="1552502491096" expanded="true" signature="15776:16149" ph="..." />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/gitignore.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="271">
<caret line="48" column="54" selection-start-line="48" selection-start-column="54" selection-end-line="48" selection-end-column="54" />
<folding>
<element signature="e#0#21#0" expanded="true" />
<marker date="1552505203214" expanded="true" signature="210:215" ph="..." />
<marker date="1552505203214" expanded="true" signature="1327:1771" ph="..." />
<marker date="1552505203214" expanded="true" signature="1790:2180" ph="..." />
<marker date="1552505203214" expanded="true" signature="2198:2414" ph="..." />
</folding>
</state> </state>
</provider> </provider>
</entry> </entry>

View File

@ -78,13 +78,20 @@ class Branch(window.Window):
def do_merge_list(self): def do_merge_list(self):
stdout = os.popen("git branch --merged").read() stdout = os.popen("git branch --merged").read()
proc = subprocess.Popen("git branch --merged", shell=True,
stderr=subprocess.STDOUT,
stdout=subprocess.PIPE)
stdout, stderr = proc.communicate(timeout=3)
self.text.insert(INSERT, "-----------------------------------\n") self.text.insert(INSERT, "-----------------------------------\n")
self.text.insert(INSERT, "Merged Branches\n") self.text.insert(INSERT, "Merged Branches\n")
self.text.insert(INSERT, stdout + "\n") self.text.insert(INSERT, stdout.decode("utf-8") + "\n")
self.text.insert(INSERT, "-----------------------------------\n") self.text.insert(INSERT, "-----------------------------------\n")
self.text.insert(INSERT, "Unmerged Branches\n") self.text.insert(INSERT, "Unmerged Branches\n")
stdout = os.popen("git branch --no-merged").read() proc = subprocess.Popen("git branch --no-merged", shell=True,
self.text.insert(INSERT, stdout + "\n") stderr=subprocess.STDOUT,
stdout=subprocess.PIPE)
stdout, stderr = proc.communicate(timeout=3)
self.text.insert(INSERT, stdout.decode("utf-8") + "\n")
self.text.see(END) self.text.see(END)
def do_list(self): def do_list(self):

View File

@ -49,7 +49,7 @@ class Changes(window.Window):
def discard_change(self): def discard_change(self):
if self.current_index is not None: if self.current_index is not None:
if self.discard_status[self.current_index]: if self.discard_status[self.current_index]:
os.popen("git checkout -- {0}".format(self.change_files[self.current_index])) os.popen("git reset {0}".format(self.change_files[self.current_index]))
self.discard_status[self.current_index] = False self.discard_status[self.current_index] = False
self.discard['text'] = 'Add' self.discard['text'] = 'Add'
else: else:

50
git.py
View File

@ -122,6 +122,8 @@ class Git(ssh.SSH):
readme.close() readme.close()
cmd = "git add *" cmd = "git add *"
os.popen(cmd) os.popen(cmd)
cmd = "git commit --message=\"Initial Commit.\""
os.popen(cmd)
# self.add_remote("origin") # self.add_remote("origin")
else: else:
raise AttributeError("Set Local & Fix Project First.") raise AttributeError("Set Local & Fix Project First.")
@ -179,7 +181,6 @@ class Git(ssh.SSH):
self.remotes[name] = {"name": name, self.remotes[name] = {"name": name,
"url": "ssh://{0}@{1}:{2}/{3}.git".format(self.user, self.hostname, self.base_path[1], "url": "ssh://{0}@{1}:{2}/{3}.git".format(self.user, self.hostname, self.base_path[1],
self.fix_name)} self.fix_name)}
self.if_get_remote = True self.if_get_remote = True
return stdout return stdout
else: else:
@ -215,9 +216,17 @@ class Git(ssh.SSH):
self.get_branch_server() self.get_branch_server()
if name in self.remotes.keys(): if name in self.remotes.keys():
if branch not in self.branches_server: if branch not in self.branches_server:
return os.popen("git push -u {0} {1}".format(name, branch)).read() proc = subprocess.Popen("git push -u {0} {1}".format(name, branch), shell=True,
stderr=subprocess.STDOUT,
stdout=subprocess.PIPE)
stdout, stderr = proc.communicate(timeout=30)
return stdout.decode("utf-8")
else: else:
return os.popen("git push {0} {1}".format(name, branch)).read() proc = subprocess.Popen("git push {0} {1}".format(name, branch), shell=True,
stderr=subprocess.STDOUT,
stdout=subprocess.PIPE)
stdout, stderr = proc.communicate(timeout=30)
return stdout.decode("utf-8")
else: else:
raise ValueError("Name Abnormal") raise ValueError("Name Abnormal")
else: else:
@ -231,7 +240,7 @@ class Git(ssh.SSH):
if branch in self.branches_server: if branch in self.branches_server:
proc = subprocess.Popen(["git pull", "{0} {1}".format(name, branch)], shell=True, stderr=subprocess.STDOUT, proc = subprocess.Popen(["git pull", "{0} {1}".format(name, branch)], shell=True, stderr=subprocess.STDOUT,
stdout=subprocess.PIPE) stdout=subprocess.PIPE)
stdout, stderr = proc.comunicate(timeout=30) stdout, stderr = proc.communicate(timeout=30)
return stdout.decode("utf-8") return stdout.decode("utf-8")
else: return "Current Branch '{0}' Not Exist In Server.".format(branch) else: return "Current Branch '{0}' Not Exist In Server.".format(branch)
else: else:
@ -277,8 +286,11 @@ class Git(ssh.SSH):
def commit_local(self, message): def commit_local(self, message):
if self.if_set_local and self.if_fix_local and self.if_base_init: if self.if_set_local and self.if_fix_local and self.if_base_init:
if self.base_path[0]: if self.base_path[0]:
stdout = os.popen("git commit --message=\"{0}\"".format(message)).read() proc = subprocess.Popen("git commit --message=\"{0}\"".format(message), shell=True,
return stdout stderr=subprocess.STDOUT,
stdout=subprocess.PIPE)
stdout, stderr = proc.communicate(timeout=12)
return stdout.decode("utf-8")
else: else:
raise UnboundLocalError("Init Base First") raise UnboundLocalError("Init Base First")
else: else:
@ -286,8 +298,11 @@ class Git(ssh.SSH):
def add(self): def add(self):
if self.if_set_local and self.if_fix_local and self.if_base_init: if self.if_set_local and self.if_fix_local and self.if_base_init:
stdout = os.popen("git add *").read() proc = subprocess.Popen("git add -A", shell=True,
return stdout stderr=subprocess.STDOUT,
stdout=subprocess.PIPE)
stdout, stderr = proc.communicate(timeout=8)
return stdout.decode("utf-8")
else: else:
raise AttributeError("Set Local & Fix Local & Base Init First.") raise AttributeError("Set Local & Fix Local & Base Init First.")
@ -337,11 +352,26 @@ class Git(ssh.SSH):
def status(self): def status(self):
if self.fix_name and self.if_fix_local and self.if_base_init: if self.fix_name and self.if_fix_local and self.if_base_init:
stdout = os.popen("git status").read() proc = subprocess.Popen("git status", shell=True,
return stdout stderr=subprocess.STDOUT,
stdout=subprocess.PIPE)
stdout, stderr = proc.communicate(timeout=8)
return stdout.decode("utf-8")
else: else:
raise AttributeError("Fix Project & Base Init & Fix Local First.") raise AttributeError("Fix Project & Base Init & Fix Local First.")
def set_ignore(self):
if os.path.exists(os.path.join(self.local_path, self.fix_name, ".gitignore")):
pass
else:
proc = subprocess.Popen("touch .gitignore", shell=True,
stderr=subprocess.STDOUT,
stdout=subprocess.PIPE)
stdout, stderr = proc.communicate(timeout=3)
def list_branch(self): def list_branch(self):
if self.if_get_branches: if self.if_get_branches:
for project in self.projects.items(): for project in self.projects.items():

92
gitignore.py Normal file
View File

@ -0,0 +1,92 @@
from tkinter import *
from tkinter.ttk import *
from tkinter.messagebox import *
import os
from keygen import *
import window
from info import Info
from main import default_pwd
class Gitignore(window.Window):
def __init__(self, master = None):
self.master = master
super().__init__(master)
master.title("Git Ignore Manager")
super().set_width(800)
super().set_position(350, 200)
super().apply()
self.list = Listbox(self, width=18, height=30)
self.list.bind("<<ListboxSelect>>", self.select_file)
self.add_btn = Button(self)
self.text = Text(self, width=75, height=35)
self.save_btn = Button(self)
self.pwd = default_pwd
gitign_file = open(".gitignore","r")
gitign_lines = gitign_file.readlines()
self.gitign_text = ""
if len(gitign_lines) == 0:
self.gitign_text = "# ----Git Ignore File----\n"
else:
for line in gitign_lines:
self.gitign_text += line
gitign_file.close()
self.draw_widgets()
self.files = []
self.set_list()
self.current_index = None
def select_file(self, *args):
if len(self.files) > 0:
self.current_index = self.list.curselection()[0]
def add_file(self):
if self.current_index is not None:
file_data = open(os.path.join(sys._MEIPASS, self.files[self.current_index]),"r")
for line in file_data.readlines():
self.text.insert(INSERT, line)
file_data.close()
self.text.insert(INSERT, "\n# ----PART_END----\n\n\n")
self.text.see(END)
else:
showinfo(message="Select one .gitignore file first.")
def set_list(self):
files = os.listdir(os.path.join(sys._MEIPASS))
for file in files:
file_info = os.path.splitext(file)
if file_info[1] == ".gitignore":
self.files.append(file)
self.files.sort()
for file in self.files:
file_info = os.path.splitext(file)
self.list.insert(END, file_info[0])
def do_save(self):
self.gitign_text = self.text.get(1.0, END)
gitign_file = open(".gitignore", "w")
gitign_file.write(self.gitign_text)
gitign_file.close()
showinfo(message="File Saved")
def draw_widgets(self):
self.save_btn["text"] = "Save"
self.add_btn["text"] = "Add"
self.save_btn["command"] = self.do_save
self.add_btn["command"] = self.add_file
self.save_btn.grid(row=1, column=1, sticky=E)
self.add_btn.grid(row=1, column=0, sticky=E)
self.text.grid(row=0, column=1)
self.list.grid(row=0, column=0)
self.text.insert(INSERT, self.gitign_text)
if __name__ == "__main__":
gitign = Gitignore(Tk())
gitign.mainloop()

View File

@ -28,8 +28,12 @@ class Key(ssh.SSH):
ret_code = subprocess.Popen(["ssh-keygen", "-b 4096","-N ''", "-q", ret_code = subprocess.Popen(["ssh-keygen", "-b 4096","-N ''", "-q",
"-f {0}".format(os.path.join(os.path.expanduser('~'),".ssh","id_rsa")), "-f {0}".format(os.path.join(os.path.expanduser('~'),".ssh","id_rsa")),
], shell=False, ], shell=False,
stdin=subprocess.PIPE, stdout=subprocess.PIPE) stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
stdout, stderr = ret_code.communicate(input=b"\ny\n") try:
stdout, stderr = ret_code.communicate(input=b"\ny\n", timeout=8)
except subprocess.TimeoutExpired:
ret_code.kill()
stdout, stderr = ret_code.communicate()
return stdout.decode("utf-8") return stdout.decode("utf-8")
def get_key(self): def get_key(self):

17
main.py
View File

@ -9,8 +9,10 @@ from info import *
from change import * from change import *
from sshtool import * from sshtool import *
from branchmanager import * from branchmanager import *
from gitignore import *
import paramiko import paramiko
default_pwd = os.getcwd()
class Main(window.Window): class Main(window.Window):
def __init__(self, master=None): def __init__(self, master=None):
@ -43,6 +45,7 @@ class Main(window.Window):
self.commit = Button(self, width=12) self.commit = Button(self, width=12)
self.save = Button(self, width=15) self.save = Button(self, width=15)
self.ssh_tools = Button(self, width=12) self.ssh_tools = Button(self, width=12)
self.gitignore = Button(self, width=12)
self.info = None self.info = None
self.save_info = None self.save_info = None
@ -386,6 +389,13 @@ class Main(window.Window):
else: else:
showinfo(message="Connect and Fix Local Project First") showinfo(message="Connect and Fix Local Project First")
def start_git_ignore(self):
if self.git is not None and self.git.if_fix_local:
self.git.set_ignore()
self.gitignore_interface = Gitignore(master=Tk())
else:
showinfo(message="Connect and Fix Local Project First")
def draw_widget(self): def draw_widget(self):
self.hostname_label["text"] = "Hostname: " self.hostname_label["text"] = "Hostname: "
self.hostname_label.grid(row=0, column=0, sticky=W) self.hostname_label.grid(row=0, column=0, sticky=W)
@ -440,6 +450,10 @@ class Main(window.Window):
# self.list_remote["command"] = self.do_list_remote # self.list_remote["command"] = self.do_list_remote
# self.list_remote.grid(row=4, column=1) # self.list_remote.grid(row=4, column=1)
self.gitignore["text"] = "Git Ignore"
self.gitignore["command"] = self.start_git_ignore
self.gitignore.grid(row=4, column=1)
self.pull["text"] = "Pull" self.pull["text"] = "Pull"
self.pull["command"] = self.do_pull self.pull["command"] = self.do_pull
self.pull.grid(row=3, column=0) self.pull.grid(row=3, column=0)
@ -452,9 +466,6 @@ class Main(window.Window):
self.add["command"] = self.do_add self.add["command"] = self.do_add
self.add.grid(row=4, column=0) self.add.grid(row=4, column=0)
self.commit["text"] = "Commit"
self.commit["command"] = self.do_commit
self.commit.grid(row=4, column=1)
self.save["text"] = "Save Information" self.save["text"] = "Save Information"
self.save["command"] = self.do_save self.save["command"] = self.do_save

2
ssh.py
View File

@ -22,9 +22,7 @@ class SSH(object):
self.ssh.close() self.ssh.close()
def run(self, cmd): def run(self, cmd):
print("CMD:", cmd)
stdin, stdout, stderr = self.ssh.exec_command(cmd) stdin, stdout, stderr = self.ssh.exec_command(cmd)
stdout = list(stdout) stdout = list(stdout)
stderr = list(stderr) stderr = list(stderr)
return stdout, stderr return stdout, stderr

View File

@ -35,9 +35,14 @@ class SSH_Tools(window.Window,Key):
def do_check_key(self): def do_check_key(self):
ret_code = subprocess.Popen("ssh -o StrictHostKeyChecking=no -T {0}@{1}".format(self.user, self.hostname), ret_code = subprocess.Popen("ssh -o StrictHostKeyChecking=no -T {0}@{1}".format(self.user, self.hostname),
shell=False, shell=False,
stdin=subprocess.PIPE, stdout=subprocess.PIPE stdin=subprocess.PIPE, stdout=subprocess.PIPE,
) stderr=subprocess.STDOUT)
stdout, stderr = ret_code.communicate(input=b"\x03") try:
stdout, stderr = ret_code.communicate(input=b"\x03", timeout=8)
ret_code.send_signal(subprocess.CTRL_C_EVENT)
except subprocess.TimeoutExpired:
ret_code.kill()
stdout, stderr = ret_code.communicate()
self.broad.insert(INSERT, "--------------------------\n") self.broad.insert(INSERT, "--------------------------\n")
self.broad.insert(INSERT, "{0}\n".format(stdout.decode("utf-8"))) self.broad.insert(INSERT, "{0}\n".format(stdout.decode("utf-8")))
self.broad.see(END) self.broad.see(END)