Merge lp:~adam-collard/landscape-client/retain-lib-fs-backwards-compat into lp:~landscape/landscape-client/trunk

Proposed by Adam Collard
Status: Merged
Approved by: Adam Collard
Approved revision: 956
Merged at revision: 956
Proposed branch: lp:~adam-collard/landscape-client/retain-lib-fs-backwards-compat
Merge into: lp:~landscape/landscape-client/trunk
Diff against target: 14 lines (+5/-0)
1 file modified
landscape/lib/fs.py (+5/-0)
To merge this branch: bzr merge lp:~adam-collard/landscape-client/retain-lib-fs-backwards-compat
Reviewer Review Type Date Requested Status
Free Ekanayaka (community) Approve
🤖 Landscape Builder test results Approve
Alberto Donato (community) Approve
Review via email: mp+319844@code.launchpad.net

Commit message

Add backwards compatible aliases for landscape.lib.fs.read_file and landscape.lib.fs.create_file given their usage in server code.

Description of the change

Add backwards compatible aliases for landscape.lib.fs.read_file and landscape.lib.fs.create_file given their usage in server code.

Testing instructions:
* Run the server tests with landscape-client from this branch

To post a comment you must log in.
Revision history for this message
Alberto Donato (ack) wrote :

+1

review: Approve
Revision history for this message
🤖 Landscape Builder (landscape-builder) :
review: Abstain (executing tests)
Revision history for this message
🤖 Landscape Builder (landscape-builder) wrote :

Command: TRIAL_ARGS=-j4 make check
Result: Success
Revno: 956
Branch: lp:~adam-collard/landscape-client/retain-lib-fs-backwards-compat
Jenkins: https://ci.lscape.net/job/latch-test-xenial/3622/

review: Approve (test results)
Revision history for this message
Free Ekanayaka (free.ekanayaka) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'landscape/lib/fs.py'
2--- landscape/lib/fs.py 2017-03-14 14:45:53 +0000
3+++ landscape/lib/fs.py 2017-03-14 17:01:21 +0000
4@@ -96,6 +96,11 @@
5 return content
6
7
8+# Aliases for backwards compatibility
9+read_file = read_binary_file
10+create_file = create_binary_file
11+
12+
13 def touch_file(path, offset_seconds=None):
14 """Touch a file, creating it if it doesn't exist.
15

Subscribers

People subscribed via source and target branches

to all changes: