Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Fix target path variable name in custom data example.
  • Loading branch information
vladimir-v-diaz committed Jun 25, 2014
1 parent 31fdd2f commit 707d316
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tuf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,10 @@ $ mkdir django; echo 'file4' > django/file4.txt
# In the example below, file permissions of the target (octal number specifying file
# access for owner, group, others (e.g., 0755) is added alongside the default fileinfo.
# All target objects in metadata include the target's filepath, hash, and length.
>>> octal_file_permissions = oct(os.stat(target2_filepath).st_mode)[4:]
>>> target3_filepath = "path/to/repository/targets/file3.txt"
>>> octal_file_permissions = oct(os.stat(target3_filepath).st_mode)[4:]
>>> custom_file_permissions = {'file_permissions': octal_file_permissions}
>>> repository.targets.add_target("path/to/repository/targets/file3.txt", custom_file_permissions)
>>> repository.targets.add_target(target3_filepath, custom_file_permissions)

# The private key of the updated targets metadata must be loaded before it can be signed and
# written (Note the load_repository() call above).
Expand Down

0 comments on commit 707d316

Please sign in to comment.