From 756da55018c9870e11013d5ac0f20134265fbd63 Mon Sep 17 00:00:00 2001
From: Einar Forselv <eforselv@gmail.com>
Date: Thu, 18 Apr 2019 07:22:24 +0200
Subject: [PATCH] Allow setting mode on volumes

---
 restic_volume_backup/containers.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/restic_volume_backup/containers.py b/restic_volume_backup/containers.py
index 121db9a..21d4c84 100644
--- a/restic_volume_backup/containers.py
+++ b/restic_volume_backup/containers.py
@@ -44,14 +44,14 @@ class Container:
         return self.get_config('Env', default=[])
 
     @property
-    def volumes(self):
+    def volumes(self, mode='rw'):
         """
         Return volumes for the container in the following format:
             {'/home/user1/': {'bind': '/mnt/vol2', 'mode': 'rw'},}
         """
         volumes = {}
         for mount in self._mounts:
-            volumes[mount.source] = {'bind': mount.destination, 'mode': 'ro'}
+            volumes[mount.source] = {'bind': mount.destination, 'mode': mode}
 
         return volumes