Gets key data. Gets the source of the key. Loads the data of the key. Closes the key file. Returns the key.
()
| 164 | print 'Please enter a different filename.' |
| 165 | |
| 166 | def get_key(): |
| 167 | '''Gets key data. |
| 168 | |
| 169 | Gets the source of the key. |
| 170 | Loads the data of the key. |
| 171 | Closes the key file. |
| 172 | Returns the key.''' |
| 173 | key_file = get_source('What is the name of the key file?') |
| 174 | key = Unpickler(key_file).load() |
| 175 | key_file.close() |
| 176 | return key |
| 177 | |
| 178 | def work_encode(source, destination, key): |
| 179 | '''Encodes and saves a file. |
no test coverage detected